//
// $Revision: 1.10 $
// $Date: 2005-03-31 16:40:13+09 $
// $Author: sakurai $

/*

how to use:

<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
  width=320 height=240>
  <param name="CODE" value="SimpleSlideShow.class">
  <param name="type" value="application/x-java-applet;version=1.2">
  <param name="m_mode" value="0">
  <param name="c_mode" value="0">
  <param name="seq_mode" value="0">
  <param name="help" value="click me!">
  <param name="initPicture" value="init.jpg">
  <param name="pictureCount" value="15">
  <param name="file0" value="20050318001.jpg">
  <param name="file1" value="20050318002.jpg">
  <param name="file2" value="20050318003.jpg">
  <param name="file3" value="20050318004.jpg">
  :

</object>

*/

import java.applet.Applet;
import java.awt.*;
import java.awt.image.*;
import java.util.Date;
import java.net.URL;
import java.util.Formatter;
import java.io.*;
import javax.imageio.*;

public class SimpleSlideShow extends Applet implements Runnable {
    public static final int W = 500;
    public static final int H = 333;
    public static double sin = 0.5;
    public static double cos = 0.86602540378444;
//    public static final double K = 198.56406460551;
    public static final double K = H/2;
    public static final double R = 24;
    public static final double Q = 36;
    public static final double PAI = 3.141592653589793238;
    public static final int N = 32;
    public static final int URA = 220;

    Thread animator;
    boolean cont = false;

    // mekuri-ode 0: tranclucent
    //            1: reverse
    //            2: light gray
    int m_mode = 0;

    // curl-mode  0: non curl
    //            1: curl
    int c_mode = 0;

    // sequential mode 0: sequential
    //                 1: random
    int seq_mode = 0;

    int pictureCount;
    int pict_idx = 0;
     
    BufferedImage base = new BufferedImage(W, 2*H, BufferedImage.TYPE_INT_RGB);
    BufferedImage bImg1 = new BufferedImage(W, H, BufferedImage.TYPE_INT_RGB);
    BufferedImage bImg2 = new BufferedImage(W, H, BufferedImage.TYPE_INT_RGB);
    WritableRaster ras0 = base.getRaster();
    WritableRaster ras1 = bImg1.getRaster();
    WritableRaster ras2 = bImg2.getRaster();
    Graphics2D gg0 = base.createGraphics();
    Graphics2D gg1 = bImg1.createGraphics();
    Graphics2D gg2 = bImg2.createGraphics();
    DLinkList llist = new DLinkList();

    BufferedImage baloon = new BufferedImage(W, H, BufferedImage.TYPE_INT_RGB);
    Graphics2D baloonG = baloon.createGraphics();
    FontMetrics fm;
    int fontSize = 10;
    String help = "click me!";
    BaloonHelp b0 = new BaloonHelp();
    boolean BaloonSaveFlag = false;

    double au2[] = {0,0.031250008830324,0.062500070642758,0.093750238420216,0.12500056514723,0.15625110381077,0.18750190740102,0.21875302891222,0.25000452134346,0.28125643769948,0.31250883099151,0.34376175423805,0.37501526046569,0.40626940270991,0.43752423401593,0.46877980743946,0.50003617604756,0.53129339291944,0.56255151114727,0.59381058383696,0.62507066410906,0.65633180509946,0.68759405996032,0.71885748186079,0.75012212398788,0.78138803954728,0.81265528176413,0.8439239038839,0.87519395917316,0.90646550092043,0.93773858243699,0.96901325705772,1.0002895781419,1.031567599074,1.0628473732646,1.0941289541511,1.1254123951988,1.1566977499012,1.1879850717816,1.2192744143932,1.2505658313202,1.2818593761789,1.3131551026182,1.3444530643205,1.3757533150026,1.4070559084165,1.4383608983504,1.4696683386292,1.5009782831158,1.5322907857114,1.5636059003568,1.5949236810332,1.6262441817627,1.6575674566096,1.6888935596809,1.7202225451275,1.7515544671447,1.7828893799732,1.8142273379001,1.8455683952597,1.8769126064341,1.9082600258545,1.9396107080019,1.9709647074076,2.0023220786548,2.0336828763788,2.0650471552683,2.0964149700661,2.1277863755701,2.159161426634,2.1905401781684,2.2219226851416,2.2533090025804,2.2846991855712,2.3160932892606,2.3474913688567,2.3788934796298,2.410299676913,2.4417100161039,2.4731245526644,2.5045433421229,2.535966440074,2.5673939021804,2.5988257841731,2.6302621418528,2.6617030310906,2.693148507829,2.7245986280829,2.7560534479404,2.7875130235638,2.8189774111906,2.8504466671344,2.8819208477859,2.9134000096138,2.9448842091658,2.9763735030695,3.0078679480336,3.0393676008483,3.0708725183871,3.102382757607,3.1338983755501,3.1654194293442,3.1969459762037,3.2284780734311,3.2600157784176,3.2915591486441,3.3231082416824,3.354663115196,3.3862238269415,3.4177904347689,3.4493629966235,3.4809415705463,3.5125262146752,3.5441169872461,3.575713946594,3.6073171511537,3.6389266594614,3.6705425301553,3.7021648219769,3.7337935937718,3.7654289044911,3.7970708131923,3.8287193790404,3.8603746613089,3.8920367193812,3.9237056127512,3.9553814010249,3.987064143921,4.0187539012725,4.0504507330277,4.0821546992508,4.1138658601239,4.1455842759474,4.1773100071415,4.2090431142472,4.2407836579277,4.2725316989691,4.3042872982821,4.3360505169025,4.3678214159932,4.3996000568447,4.4313865008764,4.4631808096383,4.4949830448115,4.5267932682097,4.5586115417807,4.590437927607,4.6222724879078,4.6541152850393,4.6859663814968,4.7178258399154,4.7496937230716,4.7815700938841,4.8134550154156,4.8453485508737,4.8772507636125,4.9091617171332,4.9410814750865,4.9730101012728,5.0049476596443,5.0368942143057,5.0688498295161,5.1008145696899,5.1327884993984,5.1647716833709,5.1967641864963,5.2287660738244,5.2607774105671,5.2927982621,5.3248286939636,5.356868771865,5.3889185616789,5.4209781294492,5.4530475413905,5.4851268638896,5.5172161635065,5.5493155069764,5.5814249612108,5.613544593299,5.6456744705099,5.677814660293,5.7099652302802,5.7421262482872,5.7742977823151,5.8064799005519,5.8386726713739,5.8708761633474,5.9030904452302,5.9353155859732,5.9675516547219,5.9997987208179,6.032056853801,6.0643261234099,6.0966065995847,6.1288983524682,6.1612014524072,6.1935159699548,6.2258419758713,6.2581795411268,6.290528736902,6.3228896345903,6.3552623057995,6.3876468223537,6.4200432562945,6.4524516798833,6.4848721656026,6.5173047861582,6.5497496144807,6.5822067237271,6.6146761872833,6.6471580787651,6.6796524720206,6.7121594411318,6.7446790604165,6.7772114044301,6.8097565479678,6.8423145660659,6.8748855340044,6.9074695273084,6.9400666217502,6.9726768933515,7.0053004183849,7.0379372733764,7.0705875351068,7.1032512806144,7.1359285871963,7.1686195324112,7.2013241940809,7.2340426502924,7.2667749794004,7.2995212600289,7.3322815710738,7.3650559917046,7.3978446013668,7.4306474797842,7.4634647069606,7.4962963631826,7.5291425290214,7.5620032853352,7.5948787132715,7.6277688942691,7.6606739100609,7.6935938426757,7.7265287744407,7.7594787879841,7.7924439662372,7.8254243924365,7.858420150127,7.8914313231636,7.9244579957142,7.9575002522619,7.9905581776078,8.0236318568728,8.056721375501,8.0898268192616,8.1229482742517,8.1560858268989,8.1892395639639,8.2224095725432,8.2555959400713,8.2887987543242,8.3220181034213,8.3552540758285,8.388506760361,8.4217762461859,8.455062622825,8.4883659801576,8.5216864084235,8.5550239982256,8.5883788405331,8.6217510266839,8.6551406483884,8.6885477977313,8.7219725671757,8.7554150495654,8.7888753381281,8.8223535264786,8.8558497086218,8.8893639789558,8.922896432275,8.9564471637734,8.9900162690478,9.0236038441007,9.0572099853441,9.0908347896024,9.1244783541157,9.1581407765434,9.1918221549673,9.2255225878953,9.2592421742646,9.2929810134452,9.3267392052433,9.3605168499053,9.3943140481208,9.4281309010264,9.4619675102095,9.4958239777117,9.5297004060326,9.5635968981335,9.5975135574413,9.6314504878522,9.6654077937354,9.6993855799372,9.7333839517848,9.7674030150902,9.8014428761542,9.8355036417706,9.8695854192299,9.9036883163237,9.9378124413488,9.9719579031111,10.00612481093,10.040313274643,10.07452340461,10.108755311715,10.143009107376,10.177284903545,10.211582812712,10.245902947913,10.280245422733,10.314610351309,10.348997848336,10.383408029072,10.417841009343,10.452296905546,10.486775834657,10.521277914231,10.555803262411,10.590351997933,10.624924240128,10.659520108929,10.694139724877,10.728783209124,10.763450683441,10.79814227022,10.832858092481,10.867598273878,10.902362938704,10.937152211897,10.971966219042,11.006805086382,11.04166894082,11.076557909928,11.111472121948,11.146411705801,11.181376791094,11.216367508123,11.251383987881,11.286426362063,11.321494763074,11.356589324033,11.39171017878,11.426857461883,11.462031308644,11.497231855107,11.53245923806,11.567713595047,11.602995064372,11.638303785106,11.673639897096,11.709003540967,11.744394858134,11.779813990807,11.815261081997,11.850736275527,11.886239716036,11.921771548985,11.95733192067,11.992920978225,12.028538869631,12.064185743723,12.099861750201,12.135567039634,12.171301763468,12.207066074038,12.242860124574,12.278684069206,12.31453806298,12.350422261857,12.386336822731,12.42228190343,12.45825766273,12.49426426036,12.530301857014,12.566370614359,12.602470695044,12.638602262707,12.674765481991,12.710960518546,12.747187539043,12.783446711182,12.819738203703,12.856062186395,12.892418830107,12.928808306757,12.965230789344,13.001686451957,13.038175469785,13.074698019131,13.111254277419,13.147844423207,13.184468636197,13.221127097247,13.257819988384,13.294547492812,13.331309794926,13.368107080323,13.404939535814,13.441807349438,13.47871071047,13.515649809438,13.552624838132,13.589635989619,13.626683458256,13.663767439699,13.700888130922,13.738045730228,13.77524043726,13.812472453018,13.849741979873,13.887049221578,13.924394383286,13.96177767156,13.999199294392,14.036659461216,14.074158382923,14.111696271876,14.149273341924,14.186889808422,14.224545888243,14.262241799793,14.299977763033,14.337753999488,14.375570732271,14.413428186093,14.451326587285,14.489266163814,14.5272471453,14.565269763033,14.603334249995,14.641440840873,14.679589772082,14.71778128178,14.756015609891,14.794292998121,14.83261368998,14.870977930799,14.909385967756,14.947838049888,14.986334428119,15.024875355279,15.063461086121,15.10209187735,15.140767987639,15.179489677656,15.21825721008,15.257070849631,15.29593086309,15.334837519323,15.373791089302,15.412791846134,15.451840065084,15.490936023599,15.530080001333,15.569272280174,15.60851314427,15.647802880056,15.687141776277,15.726530124023,15.765968216747,15.805456350301,15.844994822961,15.884583935457,15.924223991002,15.963915295321,16.003658156683,16.043452885931,16.083299796513,16.123199204513,16.163151428686,16.203156790489,16.243215614112,16.283328226516,16.323494957464,16.363716139559,16.403992108276,16.444323202,16.48470976206,16.525152132773,16.565650661472,16.606205698552,16.646817597506,16.687486714962,16.728213410731,16.768998047839,16.809840992573,16.850742614524,16.891703286628,16.932723385211,16.973803290033,17.01494338433,17.056144054867,17.097405691977,17.138728689616,17.180113445403,17.221560360675,17.263069840538,17.30464229391,17.346278133583,17.387977776267,17.429741642648,17.471570157441,17.513463749447,17.555422851607,17.597447901061,17.639539339204,17.681697611751,17.723923168791,17.766216464852,17.808577958963,17.851008114719,17.893507400342,17.936076288753,17.978715257636,18.021424789505,18.064205371779,18.107057496847,18.149981662145,18.19297837023,18.236048128851,18.279191451031,18.322408855141,18.365700864982,18.409068009866,18.452510824696,18.496029850054,18.539625632286,18.583298723588,18.627049682097,18.670879071979,18.714787463528,18.758775433253,18.802843563983,18.846992444957,18.89122267193,18.935534847276,18.979929580087,19.024407486287,19.068969188734,19.113615317337,19.158346509166,19.203163408568,19.248066667287,19.293056944582,19.338134907352,19.383301230263,19.428556595872,19.473901694764,19.519337225681,19.564863895662,19.61048242018,19.656193523289,19.701997937766,19.747896405261,19.793889676451,19.839978511196,19.886163678696,19.932445957655,19.978826136447,20.025305013288,20.071883396409,20.118562104234,20.16534196556,20.21222381975,20.259208516914,20.306296918114,20.353489895556,20.400788332798,20.44819312496,20.495705178936,20.543325413613,20.591054760099,20.638894161947,20.686844575397,20.734906969615,20.783082326936,20.831371643125,20.87977592763,20.928296203852,20.976933509415,21.025688896448,21.074563431871,21.123558197687,21.172674291288,21.221912825759,21.271274930198,21.320761750044,21.370374447408,21.420114201414,21.469982208558,21.519979683062,21.570107857251,21.620367981932,21.670761326783,21.721289180761,21.77195285251,21.822753670791,21.873692984912,21.924772165185,21.975992603381,22.027355713207,22.078862930797,22.130515715209,22.182315548947,22.234263938489,22.286362414837,22.33861253408,22.391015877974,22.443574054539,22.496288698678,22.549161472806,22.602194067509,22.655388202216,22.708745625893,22.762268117757,22.815957488021,22.869815578651,22.923844264152,22.978045452385,23.032421085396,23.08697314029,23.141703630117,23.196614604798,23.251708152077,23.306986398506,23.362451510467,23.418105695216,23.473951201983,23.529990323088,23.586225395113,23.642658800106,23.699292966831,23.756130372058,23.813173541907,23.870425053232,23.927887535061,23.985563670088,24.043456196218,24.101567908172,24.15990165915,24.218460362561,24.277246993816,24.336264592187,24.395516262749,24.455005178387,24.514734581888,24.574707788117,24.634928186277,24.695399242265,24.756124501123,24.817107589588,24.878352218758,24.939862186853,25.001641382115,25.063693785815,25.126023475402,25.18863462778,25.251531522742,25.31471854655,25.378200195673,25.441981080706,25.506065930462,25.570459596258,25.635167056398,25.700193420877,25.765543936301,25.831223991057,25.897239120729,25.963595013781,26.030297517537,26.097352644451,26.164766578707,26.232545683157,26.30069650663,26.369225791623,26.438140482405,26.50744773357,26.577154919055,26.64726964166,26.71779974311,26.788753314689,26.860138708494,26.931964549347,27.00423974741,27.076973511572,27.150175363646,27.223855153439,27.298023074787,27.372689682586,27.447865910944,27.523563092512,27.5997929791,27.676567763686,27.753900103933,27.831803147341,27.910290558177,27.989376546336,28.069075898307,28.149404010437,28.230376924701,28.312011367212,28.394324789741,28.477335414521,28.561062282681,28.645525306658,28.730745327005,28.816744174042,28.903544734882,28.991171026394,29.079648274783,29.169003002512,29.259263123426,29.35045804704,29.442618793095,29.53577811764,29.62997065209,29.725233056948,29.821604192089,29.919125305883,30.017840245736,30.117795693105,30.219041426554,30.321630617049,30.425620160456,30.531071053136,30.638048817672,30.746623987147,30.856872658123,30.96887712464,31.082726608207,31.198518102185,31.316357353251,31.436360008172,31.558652961239,31.68337594701,31.810683435271,31.940746901374,32.073757567053,32.209929736653,32.349504894903,32.492756790129,32.639997808973,32.791587067833,32.947940822286,33.109546061711,33.276978567975,33.450927372165,33.632228619117,33.821913681176,34.021279615171,34.231996125628,34.456275213919,34.697155276846,34.959011082343,35.248557705895,35.577100357931,35.966684936015,36.474234039414,37.699111843078,};
    double au3[] = {75.398223686155,75.366973677325,75.335723615512,75.304473447735,75.273223121008,75.241972582344,75.210721778754,75.179470657243,75.148219164812,75.116967248456,75.085714855164,75.054461931917,75.023208425689,74.991954283445,74.960699452139,74.929443878716,74.898187510107,74.866930293236,74.835672175008,74.804413102318,74.773153022046,74.741891881056,74.710629626195,74.679366204294,74.648101562167,74.616835646608,74.585568404391,74.554299782271,74.523029726982,74.491758185235,74.460485103718,74.429210429097,74.397934108013,74.366656087081,74.33537631289,74.304094732004,74.272811290956,74.241525936254,74.210238614373,74.178949271762,74.147657854835,74.116364309976,74.085068583537,74.053770621835,74.022470371152,73.991167777739,73.959862787805,73.928555347526,73.897245403039,73.865932900444,73.834617785798,73.803300005122,73.771979504392,73.740656229545,73.709330126474,73.678001141028,73.64666921901,73.615334306182,73.583996348255,73.552655290895,73.521311079721,73.4899636603,73.458612978153,73.427258978747,73.3959016075,73.364540809776,73.333176530887,73.301808716089,73.270437310585,73.239062259521,73.207683507987,73.176301001013,73.144914683575,73.113524500584,73.082130396894,73.050732317298,73.019330206525,72.987924009242,72.956513670051,72.925099133491,72.893680344032,72.862257246081,72.830829783975,72.799397901982,72.767961544302,72.736520655064,72.705075178326,72.673625058072,72.642170238215,72.610710662591,72.579246274964,72.547777019021,72.516302838369,72.484823676541,72.453339476989,72.421850183085,72.390355738121,72.358856085307,72.327351167768,72.295840928548,72.264325310605,72.232804256811,72.201277709951,72.169745612724,72.138207907737,72.106664537511,72.075115444473,72.043560570959,72.011999859214,71.980433251386,71.948860689532,71.917282115609,71.88569747148,71.854106698909,71.822509739561,71.790906535001,71.759297026694,71.727681156,71.696058864178,71.664430092383,71.632794781664,71.601152872963,71.569504307115,71.537849024846,71.506186966774,71.474518073404,71.44284228513,71.411159542234,71.379469784882,71.347772953127,71.316068986904,71.284357826031,71.252639410208,71.220913679014,71.189180571908,71.157440028227,71.125691987186,71.093936387873,71.062173169252,71.030402270162,70.99862362931,70.966837185279,70.935042876517,70.903240641344,70.871430417945,70.839612144374,70.807785758548,70.775951198247,70.744108401116,70.712257304658,70.68039784624,70.648529963083,70.616653592271,70.584768670739,70.552875135281,70.520972922543,70.489061969022,70.457142211069,70.425213584882,70.393276026511,70.361329471849,70.329373856639,70.297409116465,70.265435186757,70.233452002784,70.201459499659,70.169457612331,70.137446275588,70.105425424055,70.073394992191,70.04135491429,70.009305124476,69.977245556706,69.945176144765,69.913096822265,69.881007522649,69.848908179179,69.816798724944,69.784679092856,69.752549215645,69.720409025862,69.688258455875,69.656097437868,69.62392590384,69.591743785603,69.559551014781,69.527347522808,69.495133240925,69.462908100182,69.430672031433,69.398424965337,69.366166832354,69.333897562745,69.30161708657,69.269325333687,69.237022233748,69.2047077162,69.172381710284,69.140044145028,69.107694949253,69.075334051565,69.042961380356,69.010576863801,68.978180429861,68.945772006272,68.913351520552,68.880918899997,68.848474071674,68.816016962428,68.783547498872,68.75106560739,68.718571214134,68.686064245023,68.653544625739,68.621012281725,68.588467138187,68.555909120089,68.523338152151,68.490754158847,68.458157064405,68.425546792804,68.39292326777,68.360286412779,68.327636151048,68.294972405541,68.262295098959,68.229604153744,68.196899492074,68.164181035863,68.131448706755,68.098702426126,68.065942115081,68.03316769445,68.000379084788,67.967576206371,67.934758979194,67.901927322972,67.869081157134,67.83622040082,67.803344972884,67.770454791886,67.737549776094,67.704629843479,67.671694911714,67.638744898171,67.605779719918,67.572799293719,67.539803536028,67.506792362991,67.473765690441,67.440723433893,67.407665508547,67.374591829282,67.341502310654,67.308396866893,67.275275411903,67.242137859256,67.208984122191,67.175814113612,67.142627746084,67.109424931831,67.076205582734,67.042969610327,67.009716925794,66.976447439969,66.94316106333,66.909857705997,66.876537277732,66.843199687929,66.809844845622,66.776472659471,66.743083037767,66.709675888424,66.676251118979,66.64280863659,66.609348348027,66.575870159676,66.542373977533,66.508859707199,66.47532725388,66.441776522382,66.408207417107,66.374619842054,66.341013700811,66.307388896553,66.273745332039,66.240082909612,66.206401531188,66.17270109826,66.13898151189,66.10524267271,66.071484480912,66.03770683625,66.003909638034,65.970092785129,65.936256175946,65.902399708443,65.868523280122,65.834626788022,65.800710128714,65.766773198303,65.73281589242,65.698838106218,65.66483973437,65.630820671065,65.596780810001,65.562720044384,65.528638266925,65.494535369831,65.460411244806,65.426265783044,65.392098875225,65.357910411512,65.323700281545,65.28946837444,65.255214578779,65.22093878261,65.186640873443,65.152320738242,65.117978263422,65.083613334846,65.04922583782,65.014815657083,64.980382676812,64.945926780609,64.911447851498,64.876945771924,64.842420423744,64.807871688222,64.773299446028,64.738703577226,64.704083961278,64.669440477031,64.634773002714,64.600081415935,64.565365593674,64.530625412277,64.495860747451,64.461071474258,64.426257467113,64.391418599773,64.356554745335,64.321665776227,64.286751564207,64.251811980354,64.216846895061,64.181856178032,64.146839698274,64.111797324092,64.076728923081,64.041634362122,64.006513507375,63.971366224272,63.936192377511,63.900991831048,63.865764448095,63.830510091108,63.795228621783,63.759919901049,63.724583789059,63.689220145188,63.653828828021,63.618409695348,63.582962604158,63.547487410628,63.511983970119,63.47645213717,63.440891765485,63.40530270793,63.369684816525,63.334037942432,63.298361935954,63.262656646522,63.226921922687,63.191157612117,63.155363561581,63.119539616949,63.083685623175,63.047801424298,63.011886863424,62.975941782725,62.939966023425,62.903959425795,62.867921829141,62.831853071796,62.795752991111,62.759621423448,62.723458204164,62.687263167609,62.651036147112,62.614776974973,62.578485482453,62.542161499761,62.505804856049,62.469415379398,62.432992896811,62.396537234198,62.36004821637,62.323525667024,62.286969408736,62.250379262948,62.213755049958,62.177096588908,62.140403697771,62.103676193343,62.066913891229,62.030116605832,61.993284150341,61.956416336717,61.919512975685,61.882573876717,61.845598848023,61.808587696536,61.771540227899,61.734456246456,61.697335555233,61.660177955927,61.622983248895,61.585751233137,61.548481706282,61.511174464577,61.473829302869,61.436446014595,61.399024391763,61.361564224939,61.324065303232,61.286527414279,61.248950344231,61.211333877733,61.173677797912,61.135981886362,61.098245923122,61.060469686667,61.022652953884,60.984795500062,60.94689709887,60.908957522341,60.870976540856,60.832953923122,60.79488943616,60.756782845282,60.718633914073,60.680442404375,60.642208076264,60.603930688034,60.565609996175,60.527245755356,60.488837718399,60.450385636267,60.411889258036,60.373348330876,60.334762600034,60.296131808805,60.257455698516,60.2187340085,60.179966476075,60.141152836524,60.102292823065,60.063386166832,60.024432596853,59.985431840021,59.946383621071,59.907287662556,59.868143684822,59.828951405981,59.789710541885,59.750420806099,59.711081909878,59.671693562132,59.632255469409,59.592767335854,59.553228863194,59.513639750698,59.473999695153,59.434308390834,59.394565529472,59.354770800224,59.314923889642,59.275024481642,59.235072257469,59.195066895666,59.155008072043,59.114895459639,59.074728728691,59.034507546596,58.994231577879,58.953900484155,58.913513924095,58.873071553382,58.832573024683,58.792017987603,58.751406088649,58.710736971193,58.670010275424,58.629225638316,58.588382693582,58.547481071631,58.506520399527,58.465500300944,58.424420396122,58.383280301825,58.342079631288,58.300817994178,58.259494996539,58.218110240752,58.17666332548,58.135153845617,58.093581392245,58.051945552572,58.010245909888,57.968482043507,57.926653528714,57.884759936708,57.842800834548,57.800775785094,57.758684346951,57.716526074404,57.674300517364,57.632007221303,57.589645727192,57.547215571436,57.504716285813,57.462147397402,57.419508428519,57.37679889665,57.334018314376,57.291166189308,57.24824202401,57.205245315925,57.162175557304,57.119032235124,57.075814831014,57.032522821173,56.989155676289,56.945712861459,56.902193836101,56.858598053869,56.814924962567,56.771174004058,56.727344614176,56.683436222628,56.639448252902,56.595380122172,56.551231241198,56.507001014225,56.462688838879,56.418294106068,56.373816199868,56.329254497421,56.284608368818,56.239877176989,56.195060277587,56.150157018868,56.105166741573,56.060088778803,56.014922455893,55.969667090283,55.924321991391,55.878886460474,55.833359790493,55.787741265975,55.742030162866,55.696225748389,55.650327280894,55.604334009704,55.558245174959,55.512060007459,55.4657777285,55.419397549708,55.372918672867,55.326340289746,55.279661581921,55.232881720595,55.185999866406,55.139015169241,55.091926768041,55.044733790599,54.997435353357,54.950030561195,54.902518507219,54.854898272542,54.807168926056,54.759329524208,54.711379110758,54.66331671654,54.615141359219,54.56685204303,54.518447758525,54.469927482303,54.42129017674,54.372534789707,54.323660254284,54.274665488468,54.225549394867,54.176310860396,54.126948755957,54.077461936111,54.027849238747,53.978109484741,53.928241477597,53.878244003093,53.828115828904,53.777855704223,53.727462359372,53.676934505394,53.626270833645,53.575470015364,53.524530701243,53.47345152097,53.422231082774,53.370867972948,53.319360755358,53.267707970946,53.215908137208,53.163959747666,53.111861271318,53.059611152075,53.007207808181,52.954649631616,52.901934987477,52.849062213349,52.796029618646,52.742835483939,52.689478060262,52.635955568398,52.582266198134,52.528408107504,52.474379422003,52.42017823377,52.365802600759,52.311250545865,52.256520056038,52.201609081357,52.146515534078,52.091237287649,52.035772175688,51.980117990939,51.924272484172,51.868233363067,51.811998291042,51.755564886049,51.698930719324,51.642093314097,51.585050144248,51.527798632924,51.470336151094,51.412660016067,51.354767489937,51.296655777983,51.238322027005,51.179763323594,51.12097669234,51.061959093968,51.002707423406,50.943218507768,50.883489104267,50.823515898038,50.763295499878,50.70282444389,50.642099185032,50.581116096567,50.519871467397,50.458361499302,50.39658230404,50.33452990034,50.272200210753,50.209589058375,50.146692163413,50.083505139605,50.020023490482,49.956242605449,49.892157755693,49.827764089897,49.763056629757,49.698030265278,49.632679749854,49.566999695098,49.500984565426,49.434628672374,49.367926168618,49.300871041704,49.233457107448,49.165678002998,49.097527179525,49.028997894532,48.96008320375,48.890775952585,48.8210687671,48.750954044495,48.680423943045,48.609470371466,48.538084977661,48.466259136808,48.393983938745,48.321250174583,48.248048322509,48.174368532716,48.100200611368,48.02553400357,47.950357775211,47.874660593643,47.798430707055,47.721655922469,47.644323582222,47.566420538814,47.487933127978,47.408847139819,47.329147787848,47.248819675718,47.167846761454,47.086212318943,47.003898896414,46.920888271634,46.837161403474,46.752698379497,46.66747835915,46.581479512113,46.494678951273,46.407052659761,46.318575411372,46.229220683643,46.138960562729,46.047765639115,45.95560489306,45.862445568515,45.768253034065,45.672990629207,45.576619494066,45.479098380272,45.380383440419,45.28042799305,45.179182259601,45.076593069106,44.972603525699,44.867152633019,44.760174868483,44.651599699008,44.541351028032,44.429346561515,44.315497077948,44.19970558397,44.081866332904,43.961863677983,43.839570724916,43.714847739145,43.587540250884,43.457476784781,43.324466119102,43.188293949502,43.048718791252,42.905466896026,42.758225877182,42.606636618322,42.450282863869,42.288677624444,42.12124511818,41.94729631399,41.765995067038,41.576310004979,41.376944070984,41.166227560527,40.941948472236,40.701068409309,40.439212603812,40.14966598026,39.821123328224,39.43153875014,38.923989646742,37.699111843078,};
    double au4[] = {75.398223686155,75.429473694985,75.460723756798,75.491973924575,75.523224251302,75.554474789966,75.585725593556,75.616976715067,75.648228207498,75.679480123855,75.710732517147,75.741985440393,75.773238946621,75.804493088865,75.835747920171,75.867003493594,75.898259862203,75.929517079074,75.960775197302,75.992034269992,76.023294350264,76.054555491255,76.085817746115,76.117081168016,76.148345810143,76.179611725702,76.210878967919,76.242147590039,76.273417645328,76.304689187075,76.335962268592,76.367236943213,76.398513264297,76.429791285229,76.46107105942,76.492352640306,76.523636081354,76.554921436056,76.586208757937,76.617498100548,76.648789517475,76.680083062334,76.711378788773,76.742676750476,76.773977001158,76.805279594572,76.836584584505,76.867892024784,76.899201969271,76.930514471866,76.961829586512,76.993147367188,77.024467867918,77.055791142765,77.087117245836,77.118446231283,77.1497781533,77.181113066128,77.212451024055,77.243792081415,77.275136292589,77.30648371201,77.337834394157,77.369188393563,77.40054576481,77.431906562534,77.463270841423,77.494638656221,77.526010061725,77.557385112789,77.588763864323,77.620146371297,77.651532688735,77.682922871726,77.714316975416,77.745715055012,77.777117165785,77.808523363068,77.839933702259,77.871348238819,77.902767028278,77.934190126229,77.965617588335,77.997049470328,78.028485828008,78.059926717246,78.091372193984,78.122822314238,78.154277134095,78.185736709719,78.217201097346,78.248670353289,78.280144533941,78.311623695769,78.343107895321,78.374597189225,78.406091634189,78.437591287003,78.469096204542,78.500606443762,78.532122061705,78.563643115499,78.595169662359,78.626701759586,78.658239464573,78.689782834799,78.721331927837,78.752886801351,78.784447513096,78.816014120924,78.847586682779,78.879165256701,78.91074990083,78.942340673401,78.973937632749,79.005540837309,79.037150345616,79.06876621631,79.100388508132,79.132017279927,79.163652590646,79.195294499347,79.226943065195,79.258598347464,79.290260405536,79.321929298906,79.35360508718,79.385287830076,79.416977587428,79.448674419183,79.480378385406,79.512089546279,79.543807962102,79.575533693296,79.607266800402,79.639007344083,79.670755385124,79.702510984437,79.734274203058,79.766045102148,79.797823743,79.829610187031,79.861404495793,79.893206730966,79.925016954365,79.956835227936,79.988661613762,80.020496174063,80.052338971194,80.084190067652,80.11604952607,80.147917409227,80.179793780039,80.211678701571,80.243572237029,80.275474449767,80.307385403288,80.339305161242,80.371233787428,80.403171345799,80.435117900461,80.467073515671,80.499038255845,80.531012185553,80.562995369526,80.594987872651,80.626989759979,80.659001096722,80.691021948255,80.723052380119,80.75509245802,80.787142247834,80.819201815604,80.851271227546,80.883350550045,80.915439849662,80.947539193131,80.979648647366,81.011768279454,81.043898156665,81.076038346448,81.108188916435,81.140349934442,81.17252146847,81.204703586707,81.236896357529,81.269099849502,81.301314131385,81.333539272128,81.365775340877,81.398022406973,81.430280539956,81.462549809565,81.49483028574,81.527122038623,81.559425138562,81.59173965611,81.624065662026,81.656403227282,81.688752423057,81.721113320745,81.753485991955,81.785870508509,81.81826694245,81.850675366038,81.883095851758,81.915528472313,81.947973300636,81.980430409882,82.012899873438,82.04538176492,82.077876158176,82.110383127287,82.142902746572,82.175435090585,82.207980234123,82.240538252221,82.273109220159,82.305693213463,82.338290307905,82.370900579507,82.40352410454,82.436160959531,82.468811221262,82.501474966769,82.534152273351,82.566843218566,82.599547880236,82.632266336447,82.664998665555,82.697744946184,82.730505257229,82.76327967786,82.796068287522,82.828871165939,82.861688393116,82.894520049338,82.927366215176,82.96022697149,82.993102399427,83.025992580424,83.058897596216,83.091817528831,83.124752460596,83.157702474139,83.190667652392,83.223648078592,83.256643836282,83.289655009319,83.322681681869,83.355723938417,83.388781863763,83.421855543028,83.454945061656,83.488050505417,83.521171960407,83.554309513054,83.587463250119,83.620633258698,83.653819626226,83.687022440479,83.720241789576,83.753477761984,83.786730446516,83.819999932341,83.85328630898,83.886589666313,83.919910094579,83.953247684381,83.986602526688,84.019974712839,84.053364334543,84.086771483886,84.120196253331,84.15363873572,84.187099024283,84.220577212634,84.254073394777,84.287587665111,84.32112011843,84.354670849928,84.388239955203,84.421827530256,84.455433671499,84.489058475757,84.522702040271,84.556364462698,84.590045841122,84.62374627405,84.65746586042,84.6912046996,84.724962891398,84.75874053606,84.792537734276,84.826354587181,84.860191196365,84.894047663867,84.927924092188,84.961820584289,84.995737243596,85.029674174007,85.06363147989,85.097609266092,85.13160763794,85.165626701245,85.199666562309,85.233727327926,85.267809105385,85.301912002479,85.336036127504,85.370181589266,85.404348497085,85.438536960798,85.472747090765,85.50697899787,85.541232793532,85.5755085897,85.609806498867,85.644126634068,85.678469108888,85.712834037464,85.747221534491,85.781631715227,85.816064695498,85.850520591701,85.884999520812,85.919501600386,85.954026948566,85.988575684088,86.023147926283,86.057743795084,86.092363411032,86.127006895279,86.161674369596,86.196365956375,86.231081778636,86.265821960033,86.30058662486,86.335375898052,86.370189905197,86.405028772537,86.439892626975,86.474781596083,86.509695808103,86.544635391956,86.579600477249,86.614591194278,86.649607674036,86.684650048218,86.719718449229,86.754813010188,86.789933864935,86.825081148038,86.8602549948,86.895455541262,86.930682924215,86.965937281202,87.001218750527,87.036527471261,87.071863583251,87.107227227122,87.142618544289,87.178037676962,87.213484768152,87.248959961682,87.284463402191,87.31999523514,87.355555606825,87.39114466438,87.426762555786,87.462409429878,87.498085436356,87.533790725789,87.569525449623,87.605289760193,87.641083810729,87.676907755361,87.712761749135,87.748645948012,87.784560508886,87.820505589585,87.856481348885,87.892487946515,87.928525543169,87.964594300514,88.000694381199,88.036825948862,88.072989168146,88.109184204701,88.145411225198,88.181670397337,88.217961889858,88.25428587255,88.290642516262,88.327031992912,88.363454475499,88.399910138112,88.43639915594,88.472921705286,88.509477963574,88.546068109362,88.582692322352,88.619350783402,88.656043674539,88.692771178967,88.729533481081,88.766330766478,88.803163221969,88.840031035593,88.876934396625,88.913873495593,88.950848524287,88.987859675774,89.024907144411,89.061991125854,89.099111817077,89.136269416383,89.173464123415,89.210696139173,89.247965666028,89.285272907733,89.322618069441,89.360001357715,89.397422980547,89.434883147371,89.472382069078,89.509919958031,89.547497028079,89.585113494577,89.622769574398,89.660465485948,89.698201449188,89.735977685643,89.773794418426,89.811651872248,89.84955027344,89.887489849969,89.925470831455,89.963493449188,90.00155793615,90.039664527028,90.077813458237,90.116004967935,90.154239296046,90.192516684276,90.230837376135,90.269201616954,90.307609653911,90.346061736043,90.384558114274,90.423099041434,90.461684772276,90.500315563505,90.538991673794,90.577713363811,90.616480896235,90.655294535786,90.694154549246,90.733061205478,90.772014775457,90.811015532289,90.850063751239,90.889159709754,90.928303687488,90.967495966329,91.006736830425,91.046026566211,91.085365462433,91.124753810178,91.164191902902,91.203680036456,91.243218509116,91.282807621612,91.322447677157,91.362138981476,91.401881842838,91.441676572086,91.481523482668,91.521422890668,91.561375114841,91.601380476644,91.641439300267,91.681551912671,91.721718643619,91.761939825714,91.802215794431,91.842546888155,91.882933448216,91.923375818928,91.963874347627,92.004429384707,92.045041283661,92.085710401117,92.126437096886,92.167221733994,92.208064678728,92.248966300679,92.289926972783,92.330947071366,92.372026976188,92.413167070485,92.454367741022,92.495629378132,92.536952375771,92.578337131558,92.619784046831,92.661293526693,92.702865980066,92.744501819738,92.786201462422,92.827965328803,92.869793843596,92.911687435602,92.953646537762,92.995671587216,93.037763025359,93.079921297906,93.122146854946,93.164440151007,93.206801645119,93.249231800874,93.291731086497,93.334299974909,93.376938943791,93.41964847566,93.462429057934,93.505281183002,93.5482053483,93.591202056385,93.634271815006,93.677415137186,93.720632541296,93.763924551137,93.807291696021,93.850734510851,93.894253536209,93.937849318442,93.981522409743,94.025273368252,94.069102758134,94.113011149683,94.156999119408,94.201067250138,94.245216131112,94.289446358085,94.333758533431,94.378153266242,94.422631172442,94.467192874889,94.511839003492,94.556570195321,94.601387094723,94.646290353442,94.691280630737,94.736358593507,94.781524916418,94.826780282027,94.872125380919,94.917560911836,94.963087581817,95.008706106335,95.054417209444,95.100221623921,95.146120091416,95.192113362606,95.238202197352,95.284387364851,95.33066964381,95.377049822602,95.423528699443,95.470107082564,95.516785790389,95.563565651715,95.610447505905,95.657432203069,95.704520604269,95.751713581711,95.799012018953,95.846416811115,95.893928865091,95.941549099768,95.989278446254,96.037117848102,96.085068261552,96.13313065577,96.181306013091,96.22959532928,96.277999613785,96.326519890007,96.37515719557,96.423912582603,96.472787118026,96.521781883842,96.570897977443,96.620136511914,96.669498616353,96.718985436199,96.768598133563,96.818337887569,96.868205894713,96.918203369217,96.968331543406,97.018591668087,97.068985012938,97.119512866916,97.170176538665,97.220977356946,97.271916671067,97.32299585134,97.374216289536,97.425579399362,97.477086616952,97.528739401364,97.580539235102,97.632487624644,97.684586100992,97.736836220235,97.789239564129,97.841797740694,97.894512384833,97.947385158961,98.000417753664,98.053611888372,98.106969312048,98.160491803912,98.214181174176,98.268039264806,98.322067950307,98.37626913854,98.430644771551,98.485196826445,98.539927316272,98.594838290953,98.649931838232,98.705210084661,98.760675196622,98.816329381372,98.872174888138,98.928214009243,98.984449081268,99.040882486261,99.097516652986,99.154354058213,99.211397228062,99.268648739387,99.326111221216,99.383787356243,99.441679882373,99.499791594327,99.558125345305,99.616684048716,99.675470679971,99.734488278342,99.793739948904,99.853228864542,99.912958268044,99.972931474272,100.03315187243,100.09362292842,100.15434818728,100.21533127574,100.27657590491,100.33808587301,100.39986506827,100.46191747197,100.52424716156,100.58685831393,100.6497552089,100.7129422327,100.77642388183,100.84020476686,100.90428961662,100.96868328241,101.03339074255,101.09841710703,101.16376762246,101.22944767721,101.29546280688,101.36181869994,101.42852120369,101.49557633061,101.56299026486,101.63076936931,101.69892019279,101.76744947778,101.83636416856,101.90567141973,101.97537860521,102.04549332782,102.11602342926,102.18697700084,102.25836239465,102.3301882355,102.40246343356,102.47519719773,102.5483990498,102.62207883959,102.69624676094,102.77091336874,102.8460895971,102.92178677867,102.99801666526,103.07479144984,103.15212379009,103.2300268335,103.30851424433,103.38760023249,103.46729958446,103.54762769659,103.62860061086,103.71023505337,103.7925484759,103.87555910068,103.95928596884,104.04374899281,104.12896901316,104.2149678602,104.30176842104,104.38939471255,104.47787196094,104.56722668867,104.65748680958,104.7486817332,104.84084247925,104.93400180379,105.02819433825,105.1234567431,105.21982787824,105.31734899204,105.41606393189,105.51601937926,105.61726511271,105.7198543032,105.82384384661,105.92929473929,106.03627250383,106.1448476733,106.25509634428,106.36710081079,106.48095029436,106.59674178834,106.71458103941,106.83458369433,106.95687664739,107.08159963317,107.20890712143,107.33897058753,107.47198125321,107.60815342281,107.74772858106,107.89098047628,108.03822149513,108.18981075399,108.34616450844,108.50776974787,108.67520225413,108.84915105832,109.03045230527,109.22013736733,109.41950330133,109.63021981178,109.85449890007,110.095378963,110.3572347685,110.64678139205,110.97532404409,111.36490862217,111.87245772557,113.09733552923,};
    double ac[] = {1,0.99999949137348,0.99999796549134,0.99999542234582,0.99999186192398,0.99998728420771,0.99998168917372,0.99997507679356,0.99996744703359,0.99995879985499,0.99994913521377,0.99993845306076,0.99992675334161,0.99991403599677,0.99990030096154,0.99988554816601,0.99986977753509,0.9998529889885,0.99983518244077,0.99981635780123,0.99979651497404,0.99977565385812,0.99975377434723,0.99973087632991,0.99970695968948,0.99968202430408,0.99965607004661,0.99962909678479,0.99960110438107,0.99957209269273,0.99954206157179,0.99951101086505,0.99947894041409,0.99944585005523,0.99941173961956,0.99937660893293,0.99934045781592,0.99930328608388,0.99926509354688,0.99922588000973,0.99918564527198,0.99914438912789,0.99910211136646,0.99905881177138,0.99901449012107,0.99896914618863,0.99892277974189,0.99887539054334,0.99882697835017,0.99877754291426,0.99872708398213,0.99867560129501,0.99862309458874,0.99856956359385,0.99851500803551,0.99845942763352,0.9984028221023,0.99834519115093,0.99828653448306,0.99822685179699,0.9981661427856,0.99810440713636,0.99804164453134,0.99797785464717,0.99791303715507,0.99784719172079,0.99778031800466,0.99771241566153,0.99764348434079,0.99757352368636,0.99750253333668,0.99743051292467,0.99735746207777,0.9972833804179,0.99720826756145,0.99713212311928,0.9970549466967,0.99697673789348,0.9968974963038,0.9968172215163,0.996735913114,0.99665357067434,0.99657019376914,0.99648578196461,0.99640033482133,0.99631385189423,0.99622633273259,0.99613777688001,0.99604818387442,0.99595755324808,0.99586588452751,0.99577317723353,0.99567943088124,0.99558464497999,0.99548881903336,0.9953919525392,0.99529404498953,0.99519509587062,0.9950951046629,0.99499407084099,0.99489199387368,0.99478887322388,0.99468470834868,0.99457949869924,0.99447324372086,0.99436594285292,0.99425759552887,0.99414820117622,0.99403775921653,0.99392626906539,0.9938137301324,0.99370014182114,0.99358550352919,0.99346981464809,0.99335307456332,0.99323528265431,0.99311643829437,0.99299654085074,0.99287558968451,0.99275358415065,0.99263052359797,0.9925064073691,0.99238123480049,0.99225500522236,0.99212771795872,0.99199937232732,0.99186996763964,0.99173950320089,0.99160797830996,0.99147539225942,0.9913417443355,0.99120703381805,0.99107125998055,0.99093442209008,0.99079651940727,0.99065755118633,0.99051751667499,0.99037641511449,0.99023424573956,0.99009100777841,0.98994670045268,0.98980132297744,0.98965487456117,0.98950735440573,0.98935876170631,0.98920909565148,0.98905835542309,0.98890654019627,0.98875364913943,0.98859968141423,0.98844463617553,0.98828851257137,0.98813130974299,0.98797302682473,0.98781366294409,0.98765321722163,0.987491688771,0.98732907669886,0.98716538010492,0.98700059808184,0.98683472971528,0.9866677740838,0.98649973025889,0.98633059730491,0.98616037427909,0.98598906023145,0.98581665420484,0.98564315523486,0.98546856234985,0.98529287457087,0.98511609091167,0.98493821037862,0.98475923197073,0.98457915467962,0.98439797748944,0.9842156993769,0.98403231931118,0.98384783625397,0.98366224915935,0.98347555697384,0.98328775863634,0.98309885307805,0.98290883922252,0.98271771598557,0.98252548227524,0.9823321369918,0.98213767902769,0.9819421072675,0.98174542058791,0.98154761785768,0.98134869793761,0.9811486596805,0.98094750193111,0.98074522352615,0.9805418232942,0.9803373000557,0.98013165262292,0.97992487979991,0.97971698038245,0.97950795315805,0.97929779690587,0.97908651039671,0.97887409239294,0.9786605416485,0.97844585690884,0.97823003691086,0.97801308038292,0.97779498604474,0.9775757526074,0.97735537877328,0.97713386323603,0.97691120468053,0.9766874017828,0.97646245321004,0.97623635762051,0.97600911366352,0.9757807199794,0.97555117519942,0.97532047794577,0.9750886268315,0.97485562046048,0.97462145742735,0.9743861363175,0.97414965570697,0.97391201416245,0.97367321024119,0.97343324249101,0.97319210945017,0.97294980964741,0.97270634160182,0.97246170382284,0.9722158948102,0.97196891305385,0.97172075703392,0.97147142522068,0.97122091607445,0.97096922804561,0.97071635957447,0.97046230909128,0.97020707501612,0.9699506557589,0.96969304971927,0.96943425528655,0.96917427083973,0.96891309474734,0.96865072536746,0.9683871610476,0.96812240012469,0.96785644092499,0.96758928176406,0.96732092094665,0.96705135676668,0.96678058750719,0.96650861144023,0.96623542682682,0.9659610319169,0.96568542494924,0.9654086041514,0.96513056773966,0.96485131391893,0.9645708408827,0.96428914681299,0.96400622988026,0.96372208824334,0.96343672004938,0.96315012343374,0.96286229651998,0.96257323741975,0.96228294423271,0.96199141504647,0.96169864793655,0.96140464096624,0.96110939218659,0.96081289963627,0.96051516134156,0.96021617531622,0.95991593956147,0.95961445206583,0.95931171080512,0.95900771374234,0.95870245882759,0.95839594399802,0.95808816717769,0.95777912627754,0.9574688191953,0.95715724381537,0.95684439800877,0.95653027963305,0.95621488653217,0.95589821653648,0.95558026746254,0.95526103711312,0.95494052327704,0.95461872372914,0.95429563623012,0.9539712585265,0.95364558835053,0.95331862342003,0.95299036143838,0.95266080009436,0.95232993706208,0.95199777000087,0.95166429655521,0.95132951435456,0.95099342101335,0.95065601413082,0.9503172912909,0.94997725006216,0.94963588799768,0.94929320263493,0.94894919149567,0.94860385208585,0.9482571818955,0.94790917839861,0.947559839053,0.94720916130026,0.94685714256559,0.94650378025768,0.94614907176864,0.94579301447384,0.94543560573179,0.94507684288404,0.94471672325508,0.94435524415214,0.94399240286515,0.94362819666656,0.94326262281124,0.94289567853634,0.94252736106117,0.94215766758706,0.94178659529722,0.94141414135663,0.9410403029119,0.94066507709111,0.9402884610037,0.93991045174032,0.93953104637268,0.93915024195343,0.93876803551598,0.93838442407441,0.93799940462328,0.93761297413747,0.93722512957209,0.93683586786227,0.93644518592304,0.93605308064914,0.93565954891493,0.93526458757416,0.93486819345985,0.93447036338411,0.93407109413799,0.93367038249133,0.93326822519254,0.93286461896849,0.93245956052432,0.93205304654323,0.93164507368638,0.93123563859265,0.93082473787847,0.93041236813769,0.92999852594135,0.92958320783748,0.92916641035099,0.9287481299834,0.92832836321269,0.92790710649312,0.927484356255,0.92706010890451,0.92663436082352,0.92620710836935,0.92577834787461,0.92534807564693,0.92491628796885,0.92448298109752,0.92404815126451,0.92361179467563,0.92317390751069,0.92273448592324,0.92229352604043,0.92185102396272,0.92140697576365,0.92096137748967,0.92051422515984,0.92006551476563,0.91961524227066,0.9191634036105,0.91870999469236,0.91825501139491,0.91779844956798,0.91734030503232,0.91688057357938,0.91641925097099,0.91595633293914,0.91549181518569,0.91502569338214,0.9145579631693,0.91408862015707,0.91361765992413,0.91314507801766,0.91267086995307,0.9121950312137,0.91171755725052,0.91123844348186,0.91075768529307,0.91027527803628,0.90979121703001,0.90930549755893,0.90881811487352,0.90832906418972,0.90783834068869,0.90734593951637,0.90685185578326,0.90635608456402,0.90585862089712,0.90535945978457,0.90485859619149,0.9043560250458,0.90385174123787,0.90334573962014,0.90283801500676,0.90232856217321,0.90181737585594,0.90130445075199,0.90078978151859,0.90027336277279,0.89975518909106,0.89923525500885,0.89871355502025,0.89819008357754,0.89766483509078,0.89713780392739,0.89660898441172,0.89607837082461,0.89554595740298,0.89501173833935,0.89447570778142,0.89393785983158,0.89339818854647,0.89285668793651,0.89231335196543,0.89176817454976,0.89122114955836,0.89067227081194,0.89012153208254,0.88956892709301,0.88901444951651,0.888458092976,0.88789985104367,0.88733971724045,0.88677768503541,0.88621374784528,0.88564789903379,0.88508013191121,0.88451043973369,0.88393881570272,0.8833652529645,0.88278974460939,0.88221228367125,0.88163286312683,0.88105147589519,0.88046811483698,0.87988277275386,0.87929544238783,0.87870611642054,0.87811478747263,0.87752144810305,0.87692609080837,0.87632870802203,0.8757292921137,0.87512783538847,0.87452433008619,0.87391876838066,0.87331114237888,0.87270144412032,0.8720896655761,0.87147579864818,0.8708598351686,0.87024176689862,0.86962158552791,0.86899928267369,0.86837484987988,0.86774827861622,0.8671195602774,0.86648868618214,0.86585564757229,0.86522043561191,0.86458304138631,0.86394345590108,0.86330167008117,0.86265767476984,0.86201146072771,0.86136301863168,0.86071233907396,0.86005941256096,0.85940422951226,0.85874678025948,0.85808705504522,0.8574250440219,0.85676073725064,0.85609412470009,0.85542519624522,0.85475394166619,0.85408035064705,0.85340441277455,0.85272611753686,0.85204545432228,0.85136241241795,0.8506769810085,0.84998914917473,0.84929890589221,0.84860624002988,0.84791114034866,0.84721359549996,0.84651359402423,0.84581112434948,0.84510617478972,0.84439873354342,0.84368878869196,0.84297632819796,0.84226133990372,0.8415438115295,0.84082373067184,0.84010108480183,0.83937586126338,0.83864804727139,0.83791762990994,0.83718459613046,0.8364489327498,0.83571062644833,0.83496966376799,0.83422603111024,0.83347971473408,0.83273070075394,0.83197897513761,0.83122452370401,0.83046733212108,0.82970738590348,0.82894467041034,0.82817917084294,0.82741087224232,0.82663975948685,0.82586581728983,0.82508903019691,0.82430938258355,0.82352685865244,0.82274144243076,0.82195311776754,0.82116186833086,0.82036767760497,0.8195705288875,0.81877040528642,0.81796728971708,0.81716116489913,0.81635201335341,0.81553981739871,0.81472455914852,0.81390622050774,0.81308478316919,0.81226022861022,0.8114325380891,0.81060169264142,0.80976767307639,0.80893045997303,0.80809003367632,0.80724637429325,0.80639946168879,0.80554927548172,0.80469579504047,0.80383899947875,0.80297886765119,0.8021153781488,0.80124850929435,0.80037823913769,0.79950454545091,0.79862740572338,0.79774679715673,0.79686269665969,0.79597508084277,0.79508392601288,0.79418920816778,0.79329090299039,0.79238898584305,0.79148343176149,0.79057421544879,0.78966131126916,0.78874469324151,0.78782433503295,0.78690020995205,0.78597229094198,0.78504055057349,0.78410496103767,0.78316549413855,0.78222212128552,0.78127481348555,0.7803235413352,0.77936827501247,0.77840898426834,0.77744563841822,0.77647820633305,0.77550665643027,0.77453095666447,0.77355107451785,0.77256697699038,0.77157863058973,0.77058600132088,0.76958905467551,0.76858775562103,0.76758206858937,0.76657195746538,0.76555738557501,0.76453831567306,0.76351470993061,0.76248652992215,0.76145373661222,0.76041629034181,0.75937415081421,0.7583272770806,0.75727562752508,0.75621915984931,0.75515783105675,0.75409159743631,0.75302041454559,0.75194423719355,0.75086301942273,0.74977671449083,0.74868527485175,0.74758865213604,0.74648679713077,0.74537965975865,0.74426718905661,0.74314933315358,0.74202603924765,0.74089725358237,0.73976292142233,0.73862298702798,0.73747739362947,0.73632608339973,0.73516899742658,0.73400607568389,0.73283725700173,0.73166247903554,0.73048167823412,0.72929478980657,0.72810174768803,0.72690248450417,0.72569693153442,0.72448501867382,0.72326667439351,0.72204182569971,0.72081039809121,0.71957231551521,0.7183275003215,0.71707587321491,0.71581735320583,0.71455185755889,0.71327930173958,0.71199959935872,0.71071266211475,0.70941839973368,0.7081167199065,0.70680752822413,0.70549072810961,0.70416622074739,0.70283390500972,0.70149367737981,0.70014543187168,0.69878905994656,0.69742445042554,0.69605148939838,0.69467006012817,0.6932800429517,0.69188131517526,0.69047375096556,0.68905722123558,0.68763159352503,0.68619673187501,0.68475249669669,0.68329874463354,0.6818353284167,0.68036209671323,0.67887889396654,0.67738556022879,0.67588193098452,0.67436783696515,0.67284310395354,0.67130755257814,0.669760998096,0.66820325016382,0.66663411259627,0.66505338311072,0.66346085305743,0.66185630713416,0.66023952308402,0.65861027137555,0.65696831486343,0.65531340842862,0.65364529859629,0.65196372312981,0.650268410599,0.64855907992052,0.64683543986835,0.64509718855168,0.64334401285783,0.64157558785696,0.63979157616564,0.63799162726541,0.63617537677275,0.63434244565579,0.6324924393932,0.63062494706978,0.62873954040294,0.62683577269346,0.62491317769308,0.62297126838101,0.62100953563987,0.61902744682103,0.61702444418775,0.6149999432231,0.61295333078811,0.61088396311346,0.60879116360613,0.60667422044957,0.60453238397317,0.6023648637633,0.60017082548413,0.59794938737197,0.59569961636076,0.59342052379062,0.59111106064276,0.58877011223559,0.58639649230538,0.58398893638189,0.58154609435347,0.57906652209706,0.57654867202488,0.57399088237157,0.57139136501003,0.56874819154124,0.56605927734923,0.56332236324502,0.56053499423802,0.55769449486567,0.55479794037309,0.55184212285607,0.54882351124738,0.54573820371967,0.54258187066998,0.53934968590183,0.53603624287299,0.53263545184428,0.52914041231834,0.52554325309804,0.52183492931011,0.51800496132976,0.51404109388177,0.50992884328482,0.50565088440236,0.5011862019296,0.49650888479176,0.49158636101209,0.48637671850678,0.48082445653042,0.47485337229377,0.46835379441507,0.46115745559619,0.45298119322871,0.44327307007539,0.43060865316275,0.4,};
    double ac2[] = {4.3033093600429E-80,5.7267366452235E-11,1.8324790668571E-09,1.3914417740485E-08,5.862951865282E-08,1.78900637906E-07,4.4509375612865E-07,9.6184860480699E-07,1.8748892098442E-06,3.3778103562117E-06,5.7188359886761E-06,9.2075455765529E-06,1.4221564485232E-05,2.1213214413856E-05,3.0716119976978E-05,4.3351767528289E-05,5.9836012346592E-05,8.0985530328049E-05,0.00010772421035437,0.0001410894835341,0.00018223858554325,0.00023245474832259,0.00029315331742144,0.00036588779131233,0.00045235577903697,0.00055440487258174,0.00067403843042034,0.00081342126870258,0.00097488525661076,0.0011609348124498,0.0013742522970829,0.0016177033013728,0.0018943418243366,0.0022074153387741,0.0025603697411817,0.0029568541828163,0.0034007257788295,0.0038960541924512,0.0044471260912552,0.005058449472603,0.0057347578554213,0.0064810143355299,0.007302415501802,0.0082043952105021,0.0091926282152143,0.010273033649839,0.011451778362209,0.012735280095935,0.014130210518177,0.015643498091103,0.017282330784852,0.019054158629931,0.020966696107012,0.023027924372195,0.025246093315872,0.027629723453398,0.030187607645876,0.032928812649411,0.035862680491301,0.038998829671684,0.042347156189274,0.045917834389869,0.049721317636418,0.053768338799523,0.058069910567307,0.06263732557371,0.067482156344306,0.072616255058876,0.078051753130017,0.083801060597165,0.089876865335522,0.096292132079424,0.1030601012598,0.11019428765547,0.11770847885809,0.12561673355066,0.1339333795996,0.14267301196046,0.1518504903975,0.16148093701736,0.17157973361717,0.18216251884755,0.19324518519116,0.20484387575716,0.21697498089257,0.22965513461115,0.24290121084082,0.25673031949044,0.27115980233717,0.2862072287355,0.3018903911492,0.31822730050745,0.3352361813867,0.35293546701964,0.37134379413294,0.39047999761534,0.41036310501797,0.43101233088861,0.45244707094189,0.47468689606738,0.4977515461777,0.52166092389877,0.54643508810446,0.57209424729793,0.59865875284213,0.62614909204182,0.65458588107975,0.68398985780966,0.71438187440858,0.7457828898915,0.77821396249102,0.81169624190499,0.84625096141512,0.88189942987955,0.91866302360258,0.95656317808468,0.99562137965598,1.0358591569967,1.0772980725478,1.1199597138151,1.1638656845707,1.2090375959551,1.2554970574832,1.3032656679591,1.3523650063014,1.4028166222846,1.4546420271997,1.5078626844378,1.5625,1.6185753129393,1.6761098857366,1.7351248946157,1.795641419802,1.8576804357269,1.921262801185,1.9864092494457,2.0531403783248,2.1214766402197,2.1914383321135,2.2630455855504,2.3363183565892,2.4112764157365,2.4879393378668,2.5663264921315,2.6464570318625,2.728349884475,2.8120237413726,2.8974970478608,2.9847879930722,3.0739144999084,3.1648942150029,3.2577444987095,3.3524824151211,3.4491247221223,3.5476878614818,3.6481879489875,3.7506407646307,3.8550617428412,3.9614659627809,4.0698681386978,4.180282610346,4.2927233334763,4.407203870401,4.5237373806382,4.6423366116394,4.7630138896045,4.8857811103897,5.0106497305114,5.1376307582507,5.2667347448629,5.3979717758969,5.5313514626267,5.6668829336016,5.8045748263173,5.9444352790133,6.0864719225991,6.2306918727155,6.3771017219324,6.5257075320885,6.6765148267772,6.8295285839804,6.9847532288567,7.1421926266851,7.3018500759701,7.4637283017101,7.6278294488333,7.7941550758051,7.9627061484093,8.1334830337077,8.3064854941797,8.4817126820472,8.6591631337869,8.8388347648318,9.0207248644683,9.204830090928,9.3911464666796,9.5796693739234,9.7703935502902,9.9633130847474,10.158421413716,10.355711317402,10.555174916335,10.756803668138,10.960588364503,11.166519128397,11.37458541149,11.584775991806,11.797078971605,12.011481775497,12.22797114878,12.446533156018,12.667153179852,12.889815920043,13.114505392761,13.341204930103,13.569897179859,13.800564105516,14.033186986503,14.267746418679,14.504222315071,14.742593906849,14.982839744547,15.224937699538,15.468864965745,15.714598061603,15.962112832273,16.21138445209,16.462387427274,16.715095598876,16.969482145974,17.225519589121,17.483179794033,17.742433975523,18.003252701686,18.265605898321,18.529462853605,18.794792223006,19.061562034435,19.329739693645,19.599291989868,19.870185101692,20.142384603172,20.415855470177,20.690562086982,20.966468253077,21.24353719022,21.521731549712,21.801013419908,22.08134433394,22.362685277679,22.644996697909,22.928238510722,23.212370110132,23.497350376898,23.783137687568,24.069689923725,24.356964481437,24.644918280925,24.933507776412,25.222688966189,25.512417402859,25.802648203789,26.093336061737,26.384435255673,26.675899661777,26.967682764619,27.259737668512,27.552017109037,27.844473464736,28.137058768971,28.429724721936,28.722422702836,29.015103782211,29.307718734409,29.600218050208,29.892551949575,30.184670394557,30.476523102315,30.768059558274,31.059229029401,31.349980577605,31.640263073245,31.93002520875,32.219215512349,32.507782361892,32.795673998779,33.082838541965,33.369224002067,33.654778295541,33.939449258945,34.223184663263,34.505932228306,34.787639637172,35.068254550757,35.34772462233,35.625997512143,35.90302090209,36.178742510404,36.453110106376,36.726071525114,36.997574682315,37.267567589055,37.535998366588,37.802815261159,38.067966658809,38.331401100178,38.593067295302,38.852914138391,39.110890722587,39.366946354703,39.621030569921,39.873093146463,40.123084120218,40.370953799325,40.616652778697,40.860131954501,41.101342538567,41.340236072731,41.576764443114,41.810879894313,42.042535043519,42.27168289454,42.498276851742,42.722270733883,42.943618787851,43.162275702294,43.378196621132,43.591337156965,43.801653404348,44.009101952943,44.21363990054,44.415224865949,44.613815001735,44.809369006828,45.001846138966,45.191206226998,45.377409683014,45.56041751433,45.740191335284,45.916693378884,46.089886508257,46.259734227937,46.426200694959,46.589250729763,46.748849826917,46.904964165631,47.057560620079,47.206606769516,47.352070908187,47.493922055026,47.632129963137,47.766665129063,47.897498801831,48.024602991768,48.147950479101,48.26751482231,48.383270366262,48.495192250098,48.603256414885,48.707439611023,48.807719405411,48.904074188356,48.996483180244,49.084926437946,49.169384860975,49.249840197388,49.32627504942,49.398672878863,49.467018012179,49.531295645349,49.591491848451,49.647593569971,49.699588640844,49.747465778224,49.791214588976,49.830825572895,49.866290125655,49.897600541469,49.924750015482,49.947732645881,49.966543435721,49.981178294479,49.991634039321,49.997908396087,50,49.997908396087,49.991634039321,49.981178294479,49.966543435721,49.947732645881,49.924750015482,49.897600541469,49.866290125655,49.830825572895,49.791214588976,49.747465778224,49.699588640844,49.647593569971,49.591491848451,49.531295645349,49.467018012179,49.398672878863,49.32627504942,49.249840197388,49.169384860975,49.084926437946,48.996483180244,48.904074188356,48.807719405411,48.707439611023,48.603256414885,48.495192250098,48.383270366262,48.26751482231,48.147950479101,48.024602991768,47.897498801831,47.766665129063,47.632129963137,47.493922055026,47.352070908187,47.206606769516,47.057560620079,46.904964165631,46.748849826917,46.589250729763,46.426200694959,46.259734227937,46.089886508257,45.916693378884,45.740191335284,45.56041751433,45.377409683014,45.191206226998,45.001846138966,44.809369006828,44.613815001735,44.415224865949,44.21363990054,44.009101952943,43.801653404348,43.591337156965,43.378196621132,43.162275702294,42.943618787851,42.722270733883,42.498276851742,42.27168289454,42.042535043519,41.810879894313,41.576764443114,41.340236072731,41.101342538567,40.860131954501,40.616652778697,40.370953799325,40.123084120218,39.873093146463,39.621030569921,39.366946354703,39.110890722587,38.852914138391,38.593067295302,38.331401100178,38.067966658809,37.802815261159,37.535998366588,37.267567589055,36.997574682315,36.726071525114,36.453110106376,36.178742510404,35.90302090209,35.625997512143,35.34772462233,35.068254550757,34.787639637172,34.505932228306,34.223184663263,33.939449258945,33.654778295541,33.369224002067,33.082838541965,32.795673998779,32.507782361892,32.219215512349,31.93002520875,31.640263073245,31.349980577605,31.059229029401,30.768059558274,30.476523102315,30.184670394557,29.892551949575,29.600218050208,29.307718734409,29.015103782211,28.722422702836,28.429724721936,28.137058768971,27.844473464736,27.552017109037,27.259737668512,26.967682764619,26.675899661777,26.384435255673,26.093336061737,25.802648203789,25.512417402859,25.222688966189,24.933507776412,24.644918280925,24.356964481437,24.069689923725,23.783137687568,23.497350376898,23.212370110132,22.928238510722,22.644996697909,22.362685277679,22.08134433394,21.801013419908,21.521731549712,21.24353719022,20.966468253077,20.690562086982,20.415855470177,20.142384603172,19.870185101692,19.599291989868,19.329739693645,19.061562034435,18.794792223006,18.529462853605,18.265605898321,18.003252701686,17.742433975523,17.483179794033,17.225519589121,16.969482145974,16.715095598876,16.462387427274,16.21138445209,15.962112832273,15.714598061603,15.468864965745,15.224937699538,14.982839744547,14.742593906849,14.504222315071,14.267746418679,14.033186986503,13.800564105516,13.569897179859,13.341204930103,13.114505392761,12.889815920043,12.667153179852,12.446533156018,12.22797114878,12.011481775497,11.797078971605,11.584775991806,11.37458541149,11.166519128397,10.960588364503,10.756803668138,10.555174916335,10.355711317402,10.158421413716,9.9633130847474,9.7703935502902,9.5796693739234,9.3911464666796,9.204830090928,9.0207248644683,8.8388347648318,8.6591631337869,8.4817126820472,8.3064854941797,8.1334830337077,7.9627061484093,7.7941550758051,7.6278294488333,7.4637283017101,7.3018500759701,7.1421926266851,6.9847532288567,6.8295285839804,6.6765148267772,6.5257075320885,6.3771017219324,6.2306918727155,6.0864719225991,5.9444352790133,5.8045748263173,5.6668829336016,5.5313514626267,5.3979717758969,5.2667347448629,5.1376307582507,5.0106497305114,4.8857811103897,4.7630138896045,4.6423366116394,4.5237373806382,4.407203870401,4.2927233334763,4.180282610346,4.0698681386978,3.9614659627809,3.8550617428412,3.7506407646307,3.6481879489875,3.5476878614818,3.4491247221223,3.3524824151211,3.2577444987095,3.1648942150029,3.0739144999084,2.9847879930722,2.8974970478608,2.8120237413726,2.728349884475,2.6464570318625,2.5663264921315,2.4879393378668,2.4112764157365,2.3363183565892,2.2630455855504,2.1914383321135,2.1214766402197,2.0531403783248,1.9864092494457,1.921262801185,1.8576804357269,1.795641419802,1.7351248946157,1.6761098857366,1.6185753129393,1.5625,1.5078626844378,1.4546420271997,1.4028166222846,1.3523650063014,1.3032656679591,1.2554970574832,1.2090375959551,1.1638656845707,1.1199597138151,1.0772980725478,1.0358591569967,0.99562137965598,0.95656317808468,0.91866302360258,0.88189942987955,0.84625096141512,0.81169624190499,0.77821396249102,0.7457828898915,0.71438187440858,0.68398985780966,0.65458588107975,0.62614909204182,0.59865875284213,0.57209424729793,0.54643508810446,0.52166092389877,0.4977515461777,0.47468689606738,0.45244707094189,0.43101233088861,0.41036310501797,0.39047999761534,0.37134379413294,0.35293546701964,0.3352361813867,0.31822730050745,0.3018903911492,0.2862072287355,0.27115980233717,0.25673031949044,0.24290121084082,0.22965513461115,0.21697498089257,0.20484387575716,0.19324518519116,0.18216251884755,0.17157973361717,0.16148093701736,0.1518504903975,0.14267301196046,0.1339333795996,0.12561673355066,0.11770847885809,0.11019428765547,0.1030601012598,0.096292132079424,0.089876865335522,0.083801060597165,0.078051753130017,0.072616255058876,0.067482156344306,0.06263732557371,0.058069910567307,0.053768338799523,0.049721317636418,0.045917834389869,0.042347156189274,0.038998829671684,0.035862680491301,0.032928812649411,0.030187607645876,0.027629723453398,0.025246093315872,0.023027924372195,0.020966696107012,0.019054158629931,0.017282330784852,0.015643498091103,0.014130210518177,0.012735280095935,0.011451778362209,0.010273033649839,0.0091926282152143,0.0082043952105021,0.007302415501802,0.0064810143355299,0.0057347578554213,0.005058449472603,0.0044471260912552,0.0038960541924512,0.0034007257788295,0.0029568541828163,0.0025603697411817,0.0022074153387741,0.0018943418243366,0.0016177033013728,0.0013742522970829,0.0011609348124498,0.00097488525661076,0.00081342126870258,0.00067403843042034,0.00055440487258174,0.00045235577903697,0.00036588779131233,0.00029315331742144,0.00023245474832259,0.00018223858554325,0.0001410894835341,0.00010772421035437,8.0985530328049E-05,5.9836012346592E-05,4.3351767528289E-05,3.0716119976978E-05,2.1213214413856E-05,1.4221564485232E-05,9.2075455765529E-06,5.7188359886761E-06,3.3778103562117E-06,1.8748892098442E-06,9.6184860480699E-07,4.4509375612865E-07,1.78900637906E-07,5.862951865282E-08,1.3914417740485E-08,1.8324790668571E-09,5.7267366452235E-11,4.3033093600429E-80,};
    double ac3[] = {0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.40245436241574,0.40490868376236,0.40736292297143,0.40981703897589,0.41227099071075,0.41472473711375,0.41717823712608,0.41963144969307,0.42208433376482,0.42453684829695,0.42698895225127,0.42944060459645,0.43189176430872,0.43434239037254,0.43679244178133,0.43924187753809,0.44169065665614,0.4441387381598,0.44658608108504,0.4490326444802,0.45147838740666,0.45392326893954,0.45636724816836,0.45881028419774,0.46125233614808,0.46369336315627,0.46613332437633,0.46857217898011,0.47100988615798,0.47344640511953,0.47588169509421,0.47831571533203,0.48074842510428,0.48317978370414,0.48560975044742,0.48803828467322,0.4904653457446,0.49289089304928,0.49531488600032,0.49773728403675,0.50015804662434,0.50257713325618,0.50499450345344,0.50741011676598,0.50982393277308,0.5122359110841,0.51464601133912,0.51705419320968,0.51946041639939,0.52186464064466,0.52426682571533,0.52666693141538,0.52906491758357,0.53146074409412,0.53385437085742,0.53624575782062,0.5386348649684,0.54102165232356,0.54340607994771,0.54578810794196,0.54816769644758,0.55054480564664,0.55291939576271,0.55529142706151,0.55766085985158,0.56002765448494,0.56239177135774,0.56475317091096,0.56711181363103,0.56946766005053,0.57182067074881,0.57417080635268,0.57651802753706,0.57886229502564,0.58120356959154,0.58354181205793,0.58587698329876,0.58820904423933,0.59053795585703,0.5928636791819,0.59518617529736,0.59750540534082,0.59982133050436,0.60213391203533,0.60444311123706,0.60674888946945,0.60905120814966,0.61135002875274,0.61364531281227,0.61593702192099,0.6182251177315,0.62050956195682,0.6227903163711,0.62506734281022,0.62734060317245,0.62961005941905,0.63187567357498,0.63413740772946,0.63639522403663,0.63864908471621,0.64089895205409,0.64314478840299,0.64538655618309,0.64762421788264,0.64985773605858,0.65208707333722,0.65431219241481,0.65653305605817,0.65874962710535,0.66096186846623,0.66316974312312,0.6653732141314,0.66757224462016,0.66976679779276,0.67195683692752,0.67414232537825,0.67632322657494,0.67849950402433,0.68067112131052,0.6828380420956,0.68500023012024,0.68715764920431,0.68931026324747,0.6914580362298,0.69360093221238,0.69573891533787,0.69787194983118,0.7,0.70212303023543,0.70424100501257,0.70635388889111,0.70846164651593,0.71056424261769,0.71266164201341,0.71475380960708,0.71684071039022,0.71892230944249,0.72099857193226,0.7230694631172,0.72513494834485,0.72719499305323,0.72924956277137,0.73129862311993,0.73334213981176,0.73538007865246,0.73741240554098,0.73943908647017,0.74146008752734,0.74347537489486,0.74548491485071,0.74748867376902,0.74948661812068,0.75147871447386,0.7534649294946,0.75544522994733,0.75741958269546,0.75938795470194,0.76135031302977,0.7633066248426,0.76525685740523,0.76720097808422,0.76913895434838,0.77107075376932,0.77299634402205,0.77491569288543,0.7768287682428,0.77873553808245,0.78063597049819,0.78253003368987,0.78441769596392,0.78629892573387,0.78817369152091,0.79004196195437,0.79190370577227,0.79375889182183,0.79560748906004,0.7974494665541,0.79928479348201,0.80111343913302,0.80293537290821,0.80475056432096,0.80655898299747,0.80836059867727,0.81015538121372,0.81194330057453,0.81372432684224,0.81549843021474,0.81726558100577,0.81902574964538,0.82077890668049,0.82252502277533,0.82426406871193,0.82599601539065,0.82772083383063,0.82943849517029,0.83114897066782,0.83285223170163,0.83454824977088,0.8362369964959,0.8379184436187,0.83959256300345,0.84125932663691,0.84291870662895,0.84457067521298,0.84621520474641,0.84785226771116,0.84948183671408,0.85110388448739,0.85271838388919,0.85432530790389,0.85592462964265,0.85751632234383,0.85910035937348,0.86067671422571,0.86224536052321,0.86380627201764,0.86535942259011,0.86690478625156,0.86844233714326,0.86997204953719,0.87149389783651,0.87300785657596,0.87451390042231,0.87601200417474,0.87750214276533,0.87898429125942,0.88045842485605,0.88192451888839,0.88338254882411,0.88483249026584,0.88627431895156,0.88770801075497,0.88913354168596,0.89055088789095,0.89196002565334,0.89336093139387,0.89475358167102,0.89613795318142,0.89751402276023,0.89888176738153,0.90024116415869,0.90159219034477,0.9029348233329,0.90426904065666,0.90559481999044,0.90691213914982,0.90822097609196,0.90952130891595,0.91081311586316,0.91209637531765,0.9133710658065,0.91463716600016,0.91589465471285,0.91714351090286,0.91838371367295,0.91961524227066,0.92083807608869,0.92205219466523,0.92325757768428,0.92445420497606,0.92564205651724,0.9268211124314,0.92799135298924,0.92915275860901,0.93030530985678,0.93144898744677,0.93258377224171,0.93370964525311,0.93482658764162,0.93593458071731,0.93703360594001,0.93812364491961,0.93920467941637,0.94027669134122,0.94133966275606,0.94239357587407,0.94343841306,0.94447415683049,0.94550078985431,0.94651829495271,0.94752665509964,0.94852585342212,0.94951587320044,0.95049669786849,0.95146831101403,0.95243069637895,0.95338383785954,0.95432771950677,0.95526232552658,0.9561876402801,0.95710364828393,0.95801033421041,0.95890768288786,0.95979567930084,0.96067430859042,0.9615435560544,0.96240340714755,0.96325384748189,0.96409486282691,0.96492643910981,0.96574856241573,0.96656121898799,0.96736439522831,0.96815807769706,0.96894225311346,0.96971690835582,0.97048203046174,0.97123760662835,0.97198362421252,0.97272007073103,0.97344693386086,0.97416420143933,0.9748718614643,0.97556990209444,0.97625831164934,0.97693707860978,0.97760619161787,0.97826563947726,0.97891541115336,0.97955549577344,0.98018588262691,0.98080656116543,0.98141752100312,0.98201875191673,0.98261024384577,0.98319198689277,0.98376397132334,0.9843261875664,0.98487862621433,0.98542127802312,0.9859541339125,0.98647718496614,0.98699042243178,0.98749383772134,0.98798742241113,0.98847116824194,0.98894506711919,0.98940911111309,0.98986329245873,0.99030760355625,0.99074203697093,0.99116658543336,0.99158124183953,0.99198599925093,0.99238085089472,0.99276579016379,0.99314081061693,0.99350590597887,0.99386107014043,0.9942062971586,0.99454158125667,0.99486691682429,0.99518229841758,0.99548772075923,0.99578317873857,0.99606866741167,0.99634418200141,0.99660971789759,0.99686527065696,0.99711083600332,0.9973464098276,0.99757198818793,0.99778756730967,0.99799314358551,0.99818871357552,0.99837427400721,0.99854982177558,0.99871535394316,0.99887086774009,0.99901636056413,0.99915182998075,0.9992772737231,0.99939268969214,0.99949807595659,0.99959343075301,0.99967875248582,0.99975403972732,0.99981929121772,0.99987450586517,0.99991968274574,0.99995482110349,0.99997992035044,0.99999498006661,1,};
    double ac4[] = {0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79527072876705,0.79648785838066,0.79769941344547,0.79890543288578,0.80010595501097,0.80130101752831,0.80249065755542,0.80367491163236,0.80485381573346,0.80602740527886,0.80719571514566,0.8083587796789,0.8095166327022,0.81066930752814,0.81181683696841,0.81295925334364,0.81409658849308,0.81522887378396,0.81635614012068,0.81747841795371,0.81859573728836,0.81970812769327,0.8208156183087,0.82191823785468,0.82301601463891,0.82410897656446,0.82519715113736,0.82628056547396,0.82735924630813,0.82843321999825,0.82950251253415,0.83056714954378,0.83162715629977,0.83268255772584,0.83373337840308,0.83477964257605,0.83582137415876,0.83685859674057,0.83789133359185,0.8389196076696,0.83994344162293,0.84096285779839,0.84197787824523,0.84298852472048,0.843994818694,0.84499678135335,0.84599443360863,0.8469877960971,0.84797688918784,0.84896173298622,0.84994234733829,0.85091875183511,0.85189096581696,0.85285900837746,0.85382289836764,0.85478265439987,0.85573829485176,0.85668983786996,0.85763730137388,0.85858070305932,0.8595200604021,0.86045539066146,0.86138671088361,0.862314037905,0.86323738835567,0.86415677866245,0.86507222505213,0.8659837435546,0.86689135000585,0.86779506005095,0.86869488914704,0.86959085256612,0.87048296539792,0.87137124255264,0.87225569876363,0.87313634859012,0.87401320641975,0.87488628647116,0.8757556027965,0.87662116928389,0.8774829996598,0.8783411074915,0.87919550618928,0.88004620900884,0.88089322905344,0.88173657927617,0.88257627248206,0.88341232133022,0.88424473833595,0.88507353587271,0.8858987261742,0.88672032133631,0.88753833331904,0.88835277394841,0.88916365491834,0.88997098779245,0.89077478400592,0.89157505486721,0.8923718115598,0.89316506514396,0.89395482655834,0.89474110662168,0.89552391603444,0.89630326538035,0.89707916512799,0.89785162563236,0.89862065713636,0.89938626977229,0.90014847356331,0.90090727842489,0.9016626941662,0.90241473049152,0.9031633970016,0.90390870319501,0.90465065846945,0.90538927212306,0.90612455335568,0.90685651127015,0.90758515487349,0.90831049307816,0.90903253470324,0.90975128847562,0.91046676303112,0.91117896691569,0.91188790858647,0.91259359641294,0.91329603867797,0.91399524357893,0.91469121922869,0.91538397365671,0.91607351481,0.91675985055416,0.91744298867438,0.91812293687636,0.91879970278731,0.91947329395688,0.92014371785807,0.92081098188816,0.9214750933696,0.92213605955091,0.92279388760752,0.92344858464265,0.92410015768815,0.92474861370534,0.92539395958578,0.92603620215217,0.92667534815905,0.92731140429363,0.92794437717655,0.92857427336264,0.92920109934168,0.92982486153911,0.93044556631676,0.9310632199736,0.93167782874641,0.93228939881045,0.93289793628023,0.93350344721008,0.93410593759488,0.93470541337071,0.93530188041546,0.9358953445495,0.93648581153628,0.93707328708296,0.93765777684101,0.93823928640684,0.93881782132235,0.93939338707551,0.93996598910097,0.94053563278061,0.94110232344409,0.9416660663694,0.9422268667834,0.94278472986238,0.94333966073255,0.94389166447058,0.94444074610411,0.94498691061224,0.94553016292606,0.9460705079291,0.94660795045785,0.94714249530223,0.94767414720601,0.94820291086738,0.94872879093928,0.94925179202996,0.94977191870336,0.95028917547958,0.9508035668353,0.95131509720419,0.95182377097739,0.95232959250384,0.95283256609078,0.95333269600408,0.95382998646867,0.95432444166896,0.95481606574917,0.95530486281375,0.95579083692777,0.95627399211725,0.95675433236955,0.95723186163377,0.95770658382102,0.95817850280486,0.95864762242159,0.95911394647065,0.95957747871488,0.96003822288094,0.96049618265958,0.96095136170598,0.96140376364009,0.96185339204693,0.96230025047691,0.96274434244613,0.9631856714367,0.96362424089701,0.96406005424207,0.96449311485377,0.9649234260812,0.96535099124088,0.9657758136171,0.96619789646218,0.96661724299672,0.9670338564099,0.96744773985973,0.96785889647334,0.96826732934718,0.96867304154736,0.96907603610983,0.96947631604068,0.96987388431634,0.97026874388389,0.97066089766122,0.97105034853734,0.97143709937255,0.97182115299874,0.97220251221956,0.97258117981066,0.97295715851993,0.97333045106772,0.97370106014703,0.97406898842372,0.97443423853678,0.97479681309847,0.97515671469456,0.97551394588453,0.97586850920176,0.97622040715372,0.97656964222222,0.97691621686351,0.97726013350855,0.97760139456317,0.97794000240825,0.97827595939988,0.97860926786961,0.97893993012454,0.97926794844757,0.97959332509754,0.97991606230938,0.98023616229432,0.98055362724003,0.98086845931081,0.98118066064771,0.98149023336872,0.98179717956895,0.98210150132071,0.98240320067375,0.98270227965536,0.98299874027052,0.98329258450209,0.98358381431089,0.98387243163591,0.9841584383944,0.98444183648205,0.98472262777308,0.98500081412044,0.98527639735587,0.98554937929011,0.98581976171297,0.98608754639348,0.98635273508003,0.98661532950046,0.98687533136223,0.9871327423525,0.98738756413828,0.98763979836653,0.98788944666428,0.98813651063877,0.98838099187751,0.98862289194843,0.9888622124,0.98909895476132,0.98933312054221,0.98956471123335,0.98979372830637,0.99002017321393,0.99024404738988,0.99046535224929,0.99068408918859,0.99090025958565,0.99111386479989,0.99132490617237,0.99153338502586,0.99173930266496,0.99194266037617,0.992143459428,0.99234170107101,0.99253738653797,0.99273051704386,0.99292109378603,0.99310911794421,0.99329459068066,0.99347751314018,0.99365788645025,0.99383571172106,0.9940109900456,0.99418372249974,0.99435391014231,0.99452155401513,0.99468665514314,0.99484921453441,0.99500923318024,0.99516671205525,0.99532165211737,0.99547405430798,0.99562391955192,0.9957712487576,0.995916042817,0.9960583026058,0.99619802898336,0.99633522279284,0.99646988486124,0.99660201599943,0.99673161700222,0.99685868864843,0.9969832317009,0.99710524690658,0.99722473499657,0.99734169668613,0.99745613267479,0.99756804364635,0.99767743026893,0.99778429319504,0.99788863306159,0.99799045048995,0.99808974608598,0.99818652044008,0.99828077412723,0.99837250770701,0.99846172172365,0.99854841670607,0.99863259316791,0.99871425160753,0.99879339250811,0.99887001633762,0.99894412354888,0.99901571457959,0.99908478985235,0.99915134977466,0.99921539473903,0.99927692512289,0.99933594128873,0.99939244358401,0.9994464323413,0.99949790787819,0.99954687049739,0.99959332048672,0.99963725811911,0.99967868365267,0.99971759733064,0.99975399938146,0.99978789001876,0.99981926944138,0.99984813783336,0.999874495364,0.99989834218784,0.99991967844464,0.99993850425947,0.99995481974264,0.99996862498974,0.99997992008164,0.99998870508451,0.99999498004981,0.99999874501429,1,};
    double asin[] = {0.022377966662503808,0.044744725631432745,0.06708907482642949,0.08939982339076052,0.1116657972961012,0.13387584493889249,0.15601884272546665,0.17808370064314455,0.20005936781451433,0.22193483803210967,0.2436991552707161,0.26534141917454357,0.2868507905165186,0.30821649662696,0.3294278367889213,0.35047418759749543,0.37134500828040024,0.39202984597717705,0.41251834097436085,0.432800231893999,0.45286536083291934,0.4727036784501751,0.4923052490001173,0.5116602553085756,0.5307590036896527,0.5495919288006725,0.5681495984328493,0.5864227182352781,0.6044021363698813,0.6220788480949793,0.6394440002751905,0.6564888958154015,0.6732049980165852,0.6895839348512887,0.7056175031566468,0.7212976727428223,0.7366165904148138,0.7515665839056208,0.7661401657187915,0.7803300368784304,0.7941290905847903,0.8075304157736134,0.8205273005774418,0.8331132356871636,0.8452819176121086,0.8570272518370657,0.8683433558746352,0.8792245622113903,0.8896654211463738,0.8996607035205041,0.9092054033355268,0.9182947402612002,0.9269241620294562,0.9350893467143413,0.9427862048965929,0.9500108817117677,0.9567597587808977,0.9630294560227044,0.9688168333464657,0.9741189922246871,0.9789332771447884,0.9832572769390802,0.9870888259923642,0.9904260053265512,0.9932671435617548,0.9956108177533783,0.9974558541047773,0.9988013285551389,0.9996465672422854,0.9999911468401681,0.9998348947708847,};
    double acos[] = {0.9997495819494259,0.9989984532161037,0.9977469899924197,0.9959958190563356,0.9937458174574754,0.9909981120778675,0.9877540790675613,0.9840153431554016,0.979783776835306,0.9750614994284521,0.9698508760218446,0.9641545162837952,0.9579752731569059,0.9513162414292122,0.9441807561842022,0.9365723911304857,0.9284949568119525,0.9199524986993137,0.9109492951639849,0.9014898553353226,0.8915789168422893,0.8812214434406789,0.8704226225270875,0.8591878625408783,0.8475227902554404,0.8354332479600968,0.8229252905340753,0.8100051824140063,0.7966793944564673,0.7829546006971437,0.768837675008231,0.7543356876557512,0.739455901758509,0.7242057696504589,0.7085929291483083,0.6926251997262216,0.6763105785995474,0.6596572367195219,0.6426735146809636,0.6253679185450014,0.6077491155789319,0.5898259299153396,0.5716073381326524,0.553102464759347,0.5343205777040563,0.5152710836138651,0.49596352316312203,0.4764075662751265,0.45661300727908016,0.4365897600047345,0.416347852817187,0.39589742359431296,0.3752487146493515,0.3544120676011842,0.33339791819487946,0.31221679107509526,0.29087929451495603,0.26939611510304695,0.24777801239118546,0.2260358135056475,0.2041804077245537,0.1822227410241243,0.16017381059653962,0.13804465934214996,0.11584637033879103,0.09359006129097923,0.07128687896176446,0.04894799359002723,0.026584593296021575,0.004207878477958928,-0.018170943797554948,};


    public void init() {

	String tmp = getParameter("m_mode");
	if (tmp != null) m_mode = Integer.valueOf(tmp).intValue();

	tmp = getParameter("c_mode");
	if (tmp != null) c_mode = Integer.valueOf(tmp).intValue();

	tmp = getParameter("seq_mode");
	if (tmp != null) seq_mode = Integer.valueOf(tmp).intValue();

        // load initial picture
	String initPicture = getParameter("initPicture");
	try {
	    // ImageIO.setUseCache(false);
	    URL url = new URL(getCodeBase().toString() + initPicture);
	    bImg2 = ImageIO.read(url);
	} catch (IOException e) {
	    System.out.println("file read error:"+initPicture);
	}

	Graphics g = getGraphics();
	paint(g);

        // get filenames to be displayed
	String param = getParameter("pictureCount");
	pictureCount = Integer.valueOf(param).intValue();

	for (int i = 0; i < pictureCount; i++) {
	    llist.append_node(getParameter("file"+i));
	}

	baloonG.setFont(new Font("Helvetica", Font.BOLD, fontSize));
	fm = baloonG.getFontMetrics();

	tmp = getParameter("help");
	if (tmp != null) help = tmp;
	b0.s = help;

    }
      
    // Start the animation thread.
    public void start() {
	if (animator == null) {
	    animator = new Thread(this);
	    animator.start();
	}
    }
    
    // Stop the animation thread.
    public void stop() {
	if (animator != null) {
	    animator.stop();
	    animator = null;
	}
    }
    
    public void run() {

	while (Thread.currentThread() == animator) {

            // move next image to current image
            gg1.drawImage(bImg2, 0, 0, this);

            // load next imagea
            Object nextPicture;
	    if (seq_mode == 0) {
		// sequential
		if ((nextPicture = llist.get_data(pict_idx++)) == null) {
		    pict_idx = 0;
		    nextPicture = llist.get_data(pict_idx++);
		}
	    } else {
		int tmp;
		// random
		while ((tmp = (int)(Math.random() * (double)pictureCount)) == pict_idx);
		pict_idx = tmp;
		nextPicture = llist.get_data(pict_idx);
	    }

            try {
                URL url = new URL(getCodeBase().toString() + nextPicture);
                bImg2 = ImageIO.read(url);
            } catch (IOException e) {
                System.out.println("file read error:"+nextPicture);
            }
            gg2.drawImage(bImg2, 0, 0, this);

            // repaint
            repaint();

            // draw moving frames
            for (int w = (int)K; w >= -K-R; w -= 6) {
		// one frame
		process(w);

		repaint();

                if (!cont) {
                    animator.suspend();
                }

		try {
		    Thread.sleep(10);
		} catch (InterruptedException e) {
		    break;
		}
	    }
		 
	    try {
		Thread.sleep(3000);
	    } catch (InterruptedException e) {
		break;
	    }
	}
    }
    
    public void update(Graphics g) {
	paint(g);
    }
    public void paint(Graphics g) {
	Graphics2D g2=(Graphics2D)g;
	
	g2.drawImage(base, 0, 0, this);

    }
    
    public boolean mouseDown(Event e, int x, int y) {
	if (e.modifiers == 0) {

	    if (cont) {
		cont = false;
		BaloonSaveFlag = false;
	    } else {
		cont = true;
		animator.resume();

	    }
	    // System.out.println(cont);
	}
	return true;
    }

    public boolean mouseMove(Event e, int x, int y) {
	if (!cont) {
	    if (BaloonSaveFlag) b0.eraseBaloon();
	    b0.popBaloon(x, y);
	    //	    System.out.println(x+","+y);
	}
	return true;
    }
 
    public boolean keyDown(Event e, int code) {
	switch ((char)code) {
	case '0': m_mode = 0;
	    break;
	case '1': m_mode = 1;
	    break;
	case '2': m_mode = 2;
	    break;
	case 'c': if (c_mode == 0) c_mode = 1;
	else c_mode = 0;
	    break;
	}
	// System.out.println("keyDown:"+ m_mode);
	return true;
    }
    
    public void process(int w) {
	int ix, iy, ix2, iy2, ix3, iy3, ix4, iy4;
	int  r, g, b, r4, g4, b4, r2, g2, b2, r3, g3, b3;
	double u2, u3, coeff, c3, c2;
	int color;
	// Date now = new Date();
	
	double k = 2*w + PAI*R - K;

	sin = asin[w/6+37];
	cos = acos[w/6+37];
	
	// long startTime = now.getTime();

	for (int y = -H/2; y < H/2; y++) {
	    for (int x = -W/2; x < W/2; x++) {
		
		ix = (int)(x + W/2);
		iy = (int)(-y + H/2 -1);
		
		color = ras1.getDataBuffer().getElem(ix+iy*W);
		
		r = (int)((color & 0xff0000)>>16);
		g = (int)((color & 0xff00)>>8);
		b = (int)(color & 0xff);
		
		double u = x*cos - y*sin;
		double v = x*sin + y*cos;
		double p = u - w;
	
		if ((c_mode == 0 && (u <= k)) || (c_mode == 1 && (p <= -Q))) {
		    // area0

		} else if (c_mode == 1 && (p <= -R)) {
		    // areaX
		    double u7 = 2*w - u + 1.1*PAI*R;
                    double x7 = u7*cos + v*sin;
                    double y7 = -u7*sin + v*cos;

                    if ((-W/2 <= x7) && (x7 < W/2) && (-H/2 <= y7) && (y7 < H/2)) {
                        // System.out.println(p+",   "+(int)(-N*p + .5));
                        c2 = ac4[(int)(-N*p + .5)];
                        r = (int)(r*c2);
                        g = (int)(g*c2);
                        b = (int)(b*c2);

                        color = ((r<<16)&0xff0000)+((g<<8)&0xff00)+(b&0xff);
                    }

		} else if (p <= 0) {
		    // area1 or area4
		    double u4;
		    if (c_mode == 0) {
			u4 = 2*w - u + PAI*R;
			coeff = 1.0;
		    } else {
			u4 = au4[(int)(-N*p + .5)] + w;
			coeff = ac[(int)(-N*p + .5)];
		    }
		    double x4 = u4*cos + v*sin;
		    double y4 = -u4*sin + v*cos;
		    
		    if ((-W/2 <= x4) && (x4 < W/2) && (-H/2 <= y4) && (y4 < H/2)) {
			// area4
			if (m_mode == 2) {
			    r = g = b = (int)(URA*coeff);
			    color = ((r<<16)&0xff0000)+((g<<8)&0xff00)+(b&0xff);
			    
			} else if (m_mode == 0) {
			    ix4 = (int)(x4 + W/2);
			    iy4 = (int)(-y4 + H/2 -1);
			    
			    color = ras1.getDataBuffer().getElem(ix4+iy4*W);
			    r4 = (int)((color & 0xff0000)>>16);
			    g4 = (int)((color & 0xff00)>>8);
			    b4 = (int)(color & 0xff);
			    
			    r = (int)Math.sqrt(r * r4 * coeff);
			    g = (int)Math.sqrt(g * g4 * coeff);
			    b = (int)Math.sqrt(b * b4 * coeff);
			    color = ((r<<16)&0xff0000)+((g<<8)&0xff00)+(b&0xff);
			    
			} else {
			    ix4 = (int)(x4 + W/2);
			    iy4 = (int)(-y4 + H/2 -1);
			    color = ras1.getDataBuffer().getElem(ix4+iy4*W);
			    r4 = (int)((color & 0xff0000)>>16);
                            g4 = (int)((color & 0xff00)>>8);
                            b4 = (int)(color & 0xff);
                            r = (int)(r4*coeff);
                            g = (int)(g4*coeff);
                            b = (int)(b4*coeff);
			    color = ((r<<16)&0xff0000)+((g<<8)&0xff00)+(b&0xff);

			}
			
		    } else {
			// area1
		    }
		    
		} else if (p <= R) {
		    // area3 or area2 or area5
		    
		    u3 = au3[(int)(N*p + .5)] + w;
		    double x3 = u3*cos + v*sin;
		    double y3 = -u3*sin + v*cos;
		    
		    u2 = au2[(int)(N*p + .5)] + w;
		    double x2 = u2*cos + v*sin;
		    double y2 = -u2*sin + v*cos;
		    
		    coeff = ac[(int)(N*p + .5)];
		    
		    if ((-W/2 <= x3) && (x3 <= W/2) && (-H/2 <= y3) && (y3 <= H/2)) {
			// area3
			if (m_mode == 2) {
			    r = g = b = (int)(URA * coeff);
			} else if (m_mode == 0){
			    ix3 = (int)(x3 + W/2);
			    iy3 = (int)(-y3 + H/2 -1);
			    
			    color = ras1.getDataBuffer().getElem(ix3+iy3*W);
			    r3 = (int)((color & 0xff0000)>>16);
			    g3 = (int)((color & 0xff00)>>8);
			    b3 = (int)(color & 0xff);
			    
			    r = (int)(Math.sqrt(r * r3) * coeff);
			    g = (int)(Math.sqrt(g * g3) * coeff);
			    b = (int)(Math.sqrt(b * b3) * coeff);
			    color = ((r<<16)&0xff0000)+((g<<8)&0xff00)+(b&0xff);
			    
			} else {
			    ix3 = (int)(x3 + W/2);
			    iy3 = (int)(-y3 + H/2 -1);
			    
			    color = ras1.getDataBuffer().getElem(ix3+iy3*W);
			    r = (int)((color & 0xff0000)>>16);
			    g = (int)((color & 0xff00)>>8);
			    b = (int)(color & 0xff);
			    
			    r = (int)(r*coeff);
			    g = (int)(g*coeff);
			    b = (int)(b*coeff);
			    color = ((r<<16)&0xff0000)+((g<<8)&0xff00)+(b&0xff);
			}
			// highlight
			c3 = ac2[(int)(N*p + .5)];
			r = (int)(r + c3);
			g = (int)(g + c3);
			b = (int)(b + c3);
			if (r > 255) r = 255;
			if (g > 255) g = 255;
			if (b > 255) b = 255;
			color = ((r<<16)&0xff0000)+((g<<8)&0xff00)+(b&0xff);
			
		    } else if ((-W/2 <= x2) && (x2 < W/2) && (-H/2 <= y2) && (y2 < H/2)) {
			// area2
			ix2 = (int)(x2 + W/2);
			iy2 = (int)(-y2 + H/2 -1);
			
			color = ras1.getDataBuffer().getElem(ix2+iy2*W);
			r2 = (int)((color & 0xff0000)>>16);
			g2 = (int)((color & 0xff00)>>8);
			b2 = (int)(color & 0xff);
			
			r = (int)(r2*coeff);
			g = (int)(g2*coeff);
			b = (int)(b2*coeff);
			color = ((r<<16)&0xff0000)+((g<<8)&0xff00)+(b&0xff);
			
		    } else {
			// area5
			color = ras1.getDataBuffer().getElem(ix+iy*W);
			r = (int)((color & 0xff0000)>>16);
			g = (int)((color & 0xff00)>>8);
			b = (int)(color & 0xff);
			
			// bug???
			/*
			  if ((.4*r<80)&&(.4*g<80)&&(.4*b<80)&&(ix<1)) {
			  System.out.print(x3+","+y3+" ");
			  System.out.print(x2+","+y2+" ");
			  System.out.println(ix+","+iy+","+color);
			  color = 0xff0000;
			  }
			*/
			c2 = ac3[(int)(N*p + .5)];
			r = (int)(r*c2);
			g = (int)(g*c2);
			b = (int)(b*c2);
			color = ((r<<16)&0xff0000)+((g<<8)&0xff00)+(b&0xff);
			
		    }
		} else if (p <= Q) {
		    // area6
		    color = ras2.getDataBuffer().getElem(ix+iy*W);
		    r = (int)((color & 0xff0000)>>16);
		    g = (int)((color & 0xff00)>>8);
		    b = (int)(color & 0xff);
		    
		    c2 = ac3[(int)(N*p + .5)];
		    r = (int)(r*c2);
		    g = (int)(g*c2);
		    b = (int)(b*c2);
		    
		    color = ((r<<16)&0xff0000)+((g<<8)&0xff00)+(b&0xff);
		} else if (u <= K) {
		    // area7
		    color = ras2.getDataBuffer().getElem(ix+iy*W);
		}

		ras0.getDataBuffer().setElem(ix+iy*W, color);
		
		// System.out.println(ix+","+iy+","+r+","+g+","+b);
	    }
	    
	}

	// now = new Date();
	// long endTime = now.getTime();

	// System.out.println("difference(ms) = "+(endTime - startTime)+";"+(tsen-tssn));

    }

    public class BaloonHelp {
        public String s;
	private int stringMargin = 5;
        private int legLength = 14;
        private int roundness = 9; // half diameter
        private int px[] = new int[3];
        private int py[] = new int[3];
        private int width, height, up, left, rectHeight;

        public void popBaloon(int x, int y) {
            Graphics g = getGraphics();
            left = x - 10;

            px[0] = x + 10; px[1] = x; px[2] = x + 18;
            py[0] = y - legLength; py[1] = y - legLength + 13; py[2] = y - legLength;

	    //  System.out.println(""+i+"<"+s[i]+">");

            width = 2 * stringMargin + fm.stringWidth(s) + 13;
            rectHeight = 2 * stringMargin + fm.getHeight();
            height = rectHeight + legLength;
            up = y - height;

	    // save image
	    gg0.copyArea(left, up, width, height, -left, H - up);
	    BaloonSaveFlag = true;

            gg0.setColor(Color.white);
            gg0.fillRoundRect(left, up, width-1, rectHeight, roundness, roundness);
            gg0.setColor(Color.black);
            gg0.drawRoundRect(left, up, width-1, rectHeight, roundness, roundness);
            gg0.setColor(Color.white);
            gg0.fillPolygon(px, py, 3);
            gg0.setColor(Color.black);
            gg0.drawPolygon(px, py, 3);
            gg0.setColor(Color.white);
            gg0.drawLine(x + 10, y - legLength, x + 17, y - legLength);
            gg0.setColor(Color.black);
	    gg0.drawString(s, left + stringMargin,
			      up + stringMargin + fm.getAscent());

            paint(g);
        }
        public void eraseBaloon() {
	    // restore image
	    gg0.copyArea(0, H, width, height, left, up - H);
	    // no paint for aboiding flicker
            // paint(g);
	    
        }
    }

}
